Commands by jcm357 (1)

What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again. 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.

Share Your Commands


Check These Out

Changing the terminal title to the last shell command
Found the same command for zsh in http://www.davidpashley.com/articles/xterm-titles-with-bash.html - changed it a bit so that the behaviour is the same

power off system in X hours form the current time, here X=2

Copy the sound content of a video to an mp3 file
-vn removes tha video content, the copy option tells ffmpeg to use the same codec for generating the output

Url Encode
This one uses hex conversion to do the converting and is in shell/sed only (should probably still use the python/perl version).

Install pip with Proxy
Installs pip packages defining a proxy

Change timestamp on a file
-a for access time, -m for modification time, -c do not create any files, -t timestamp

Dock Thunderbird in system tray and hide main window
Dock Thunderbird in system tray and hide main window. Very useful for startup scripts. Of course you can dock any app of your choice.

Remove all the files except abc in the directory
Finds all files in the current directory and deletes them besides file called "abc"

Remove spaces from filenames - through a whole directory tree.
An example of zsh glob qualifiers.

Docker: Remove all exited docker container


Stay in the loop…

Follow the Tweets.

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

Subscribe to the feeds.

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: