commandlinefu.com is the place to record those command-line gems that you return to again and again.
Delete that bloated snippets file you've been using and share your personal repository with the world. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.
You can sign-in using OpenID credentials, or register a traditional username and password.
First-time OpenID users will be automatically assigned a username which can be changed after signing in.
Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.
» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10
Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):
Subscribe to the feed for:
a - archive
m5 - compression level, 0= lowest compression...1...2...3...4...5= max compression
-v5M split the output file in 5 megabytes archives, change to 700 for a CD, or 4200 for a DVD
R recursive for directories, do not use it for files
It's better to have the output of a compression already split than use the 'split' command after compression, would consume the double amount of disk space. Found at http://www.ubuntu-unleashed.com/2008/05/howto-create-split-rar-files-in-ubuntu.html
-a for access time, -m for modification time, -c do not create any files, -t timestamp
It happened to me that I got a season of a tv-show which had all files under the same folder like /home/blah/tv_show/season1/file{1,2,3,4,5,...}.avi
But I like to have them like this:
/home/blah/tv_show/season1/e{1,2,3,4,5,...}/file{1,2,3,4,5,...}.avi
So I can have both the srt and the avi on one folder without cluttering much. This command organizes everything assuming that the filename contains Exx where xx is the number of the episode.
You may need to set:
IFS=$'\n'
if your filenames have spaces.
exported files will get a .r23 extension (where 23 is the revision number)
change 20 by the number of sessions you want to know (20 it's fair enough)
when sometimes do a "w" or "who" command and see an orphan console session from time ago, you could kill with this command.
where ttyS0 its the console to kill.
Just find out the daemon with $ netstat -atulpe. Then type in his name and he gets the SIGTERM.
Today's date on a yearly calendar...
credits to http://lifehacker.com/250825/cli-fun--todays-date-on-a-yearly-calendar
ip address show | grep eth0 | sed '1d' | awk '{print $2}'
does the same, but shows network-prefix.
create an archive of files with access time older than 5 days, and remove original files.
Uses the pid to get the full path of the process. Useful when you do not which command got picked from the path
Affiche des infos detaillees sur vos connexions reseaux.
Port en ?coute, protocole, paquets, adresses, ustilisateur, PID etc...
Permet de lire une video dans une console, meme sans interface graphique.
Interet limite, mais a connaitre au cas ou.
Used for moving stuff around on a fileserver
echo "http%3A%2F%2Fwww.google.com" | sed -e's/%\([0-9A-F][0-9A-F]\)/\\\\\x\1/g' | xargs echo -e
Works under bash on linux. just alter the '-e' option to its corresponding equivalence in your system to execute escape characters correctly.
Pitch-correct play speed with mplayer. You can also use [] and {} keys to change play speed on-the-fly.
rips the audio and video stream of a movie. The two streams are stored separately.
This assumes that there is a 10.2 sec delay between the video and the audio (delayed).
To extract the original video into a audio and video composites look at the command on extracting audio and video from a movie
Takes an mpeg video and coverts it to a youtube compatible flv file.
The -r 25 sets the frame rate for PAL, for NTSC use 29.97