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 last opened tabs in firefox browser

Find the biggest files
Show the top 10 file size

Create a listing of all possible permissions and their octal representation.

Batch rename extension of all files in a folder, in the example from .txt to .md
Batch rename extension of all files in a folder, in the example from .txt to .md

connect via ssh using mac address
Instead of looking for the right ip address, just pick whatever address you like and set a static ip mapping.

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

Delete All Objects From An S3 Bucket Using S3cmd

Count occurrences per minute in a log file
The cut should match the relevant timestamp part of the logfile, the uniq will count the number of occurrences during this time interval.

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

Use tee to process a pipe with two or more processes
Tee can be used to split a pipe into multiple streams for one or more process to work it. You can add more " >()" for even more fun.


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: