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

grep for minus (-) sign
Use flag "--" to stop switch parsing

Make window transparent (50% opacity) in Gnome shell
Click window to change its opacity. Source: https://unix.stackexchange.com/a/494289

Browse shared folder when you're the only Linux user
Under Ubuntu smbclient is part of the samba package. With the version I use (3.0.28a) cd-ing into folders with spaces in the name is a drag. You have to put the folder name in quotes: smb: \Shared\> cd "Marketing and PR"

perl one-liner to get the current week number
Not perl but shorter.

Convert CSV to JSON
Replace 'csv_file.csv' with your filename.

graphical memory usage
smem is very clever, it keeps in mind shared memory in its calculations!!! http://www.selenic.com/smem/

Concatenate (join) video files
Use mencoder to concatenate (join) multiple video files together.

Quick HTML image gallery
My take on the original: even though I like the other's use of -exec echo, sed just feels more natural. This should also be slightly easier to improve. I expanded this into a script as an exercise, which took about 35 minutes (had to look up some docs): http://bitbucket.org/kniht/nonsense/src/7c1b46488dfc/commandlinefu/quick_image_gallery.py

Put a console clock in top right corner
This puts a clock in the top right of the terminal. This version doesn't use tput, but uses escape codes

Trace a DNS query from root to the authoritive servers.
Simple command to trace a DNS query from the root all the way to the authoritative servers.


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: