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 with full path

Change framebuffer font
setfont load vga console font. The default font directory is usually in /lib/kbd/consolefonts. Setfont is part of kbd package. Tested on CentOS.

Counting the source code's line numbers C/C++ Java
Count your source and header file's line numbers. This ignores blank lines, C++ style comments, single line C style comments. This will not ignore blank lines with tabs or multiline C style comments.

cat a file backwards
Or "tail -r" on Solaris.

Get IPv4 of eth0 for use with scripts
Combines wgzhao's grep | awk | sed into one awk command.

Batch resize all images in the current directory that are bigger than 800px, height or weight.
You need to install imagemagick. On Debian type: # apt-get install imagemagick

search for a file in PATH

check the filesystem and use a progress bar
if you happen to start with out the -C switch then you a killall -USR1 e2fsck

cat ~/.ssh/id_rsa.pub | ssh user@site.com "cat - >> ~/.ssh/authorized_keys"
You'll want to use this for passwordless logins. Same as ssh-copy-id, if you don't have it on your system.

List all information about all files (in current dir)
This is a funny usage of the traditional command ls. It could be basically simplified as: $ ls -a -l Duplicating arguments is permitted: $ ls -a -l -l And this markup could be shortened as: $ ls -al Extra note: To view filesizes like a pro, pray for your God: $ ls -allah


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: