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

Convert a date to timestamp
Simple way to get a timestamp from a date

Changes a User Password via command line without promt
Used to change a password via a winscp faux shell

Listing only one repository with yum
How to list just one repo with yum. First I disable all repo, second I enable just the repo that I want to list.

Show the UUID of a filesystem or partition
Shows the UUID of the given partition (here /dev/sda7). Doesn't need to be root.

Setting reserved blocks percentage to 1%
According to tune2fs manual, reserved blocks are designed to keep your system from failing when you run out of space. Its reserves space for privileged processes such as daemons (like syslogd, for ex.) and other root level processes; also the reserved space can prevent the filesystem from fragmenting as it fills up. By default this is 5% regardless of the size of the partition. http://www.ducea.com/2008/03/04/ext3-reserved-blocks-percentage/

Get your Firefox bookmarks
Extracts yours bookmarks out of sqlite with the format: dateAdded|url

Reset hosed terminal,
stty sane resets the tty to basic usable function. The ^J is a newline -- sometimes CR/LF interpretation is broken so use the ^J explicitly.

Check general system error on AIX
Check general system error on AIX

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

Dump and bz2compress a mysql db
To also move the db backup to another location you could pass the output to the dd command instead of a file $mysqldump -u user -h host -ppwd -B dbname | bzip2 -zc9 | dd ssh usr@server "dd of=db_dump"


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: