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

Remove executable bit from all files in the current directory recursively, excluding other directories
Useful if you have copied files from an OS without a permission structure (for example, DOS) and you need to disable all executable files but want to be able to descend into your directories.

BASH: Print shell variable into AWK
Alternatively: export MyVAR=84; awk '{ print ENVIRON["MyVAR"] }'

See how many % of your memory firefox is using

Get full from half remembered commands
Show all commands having the part known by you. Eg: $apropos pdf | less

how many packages installed on your archlinux?

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!

print all except first collumn

Synchronize date and time with a server over ssh
If you are stuck behind a firewall and want to synchronize time with another server but you do not want to port forward NTP (which uses UDP) then this command is handy. It gets the time from a server and sets the local time. It is not that accurate but I can live with a second or so drift.

locate a filename, make sure it exists and display it with full details
use the locate command to find files on the system and verify they exist (-e) then display each one in full details.

import gpg key from the web
imports a public key from the web. I know this by head.. but useful nevertheless


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: