All commands (14,187)

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

display information about the CPU

list block devices
Shows all block devices in a tree with descruptions of what they are.

determine if tcp port is open
@putnamhill, no need if statement in that case. && is a AND and || is a OR

Install an mpkg from the command line on OSX
Installing most OSX apps is just a matter of dropping it in /Applications, either GUI-wise or with cp -r. However, many packages are distributed in "mpkg" format, and those have to be installed with an installer. If you don't want to go to the trouble of firing up VNC to install an mpkg, you can use the "installer" command. This will install an application from a .mpkg it to /Applications system-wide. To install a program for just one user, replace "-target /" with "-target username".

Play all the music in a folder, on shuffle
Play files in shuffle mode with bash and mpg123. Why bother using big-as-hell stuff like mplayer? This will play all your music files contained in */* (in my case author/song.format) with bash and mplayer showing a nice output.

Map the slot of an I/O card to its PCI bus address
Recent hardware may or may not enumerate *both of* these values

git log with color and path
Cool alias that show a a better Git log

find text in a file
this will find text in the directory you specify and give you line where it appears.

Create an SSH tunnel for accessing your remote MySQL database with a local port

Create a transition between two videos
We take the first 50 frames of a.mp4 for track a, and 24 blank frames followed by b.mp4 for track b. We then create a transition from track a to track b starting from frame 25 and ending at frame 49. The output is stored in out.mp4 To view the results without saving remove "-consumer avformat:out.mp4" from the end. Documentation of the mlt framework and the melt command can be found here: http://www.mltframework.org/bin/view/MLT/Documentation


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: