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

Lvextend logical volume
this command extends your logical volume. then it does a resize2fs on it as well. added the -r switch to make it launch resize.

Identify name and resolution of all jpgs in current directory

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

Load your [git-controlled] working files into the vi arglist.
Branch name may be substituted, of course.

command to change the exif date time of a image

Colored status of running services
Replace service --status-all 2>&1 by service --status-all 2>/dev/null to hide all services with the status [ ? ]

Real full backup copy of /etc folder
Yes, rsync(1) supports local directories. And, should anything change, it's trivial to run the command again, and grab only the changes, instead of the full directory.

Print all /etc/passwd lines with duplicated uid
Prints all the lines in /etc/passwd belonging to users with a duplicated uid. It also adds the hostname to the beginning of the line. It's been tested in AIX, Solaris and Linux.

Geolocate a given IP address
Defines a function to geolocate a given IP address; if none supplied, will default to your external IP address.

Search $PATH for a command or something similar
Searches your $PATH for whatever you substitute for bash, though not sure if this will work if you substitute a different shell for bash!


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: