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

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

Search some text from all files inside a directory

View user activity per directory.
View all files opened by a user in specified directory. The +D option makes lsof search all sub-directories to complete depth, while ignoring symbolic links.

Get absolut path to your bash-script
Another way of doing it that's a bit clearer. I'm a fan of readable code.

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

Advanced python tracing
Trace python statement execution and syscalls invoked during that simultaneously

Get the IP address of a machine. Just the IP, no junk.

need ascii art pictures for you readme text ?
Require boxes and / or cowsay packages. After input boxes -d dog , type your text and then press ctrl + d . Same goes for cowsay .

Create a progress bar over entire window until we count to 1000
https://wuseman.nr1.nu:8080/file/E8AcLVgMPZ2LSJQf/9BD8V8ADYNhR6cca/parallel_print_progress.gif

Use tee + process substitution to split STDOUT to multiple commands
Using process substitution, we can 'trick' tee into sending a command's STDOUT to an arbitrary number of commands. The last command (command4) in this example will get its input from the pipe.


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: