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

Find passwords that has been stored as plain text in NetworkManager

Make window transparent (50% opacity) in Gnome shell
Click window to change its opacity. Source: https://unix.stackexchange.com/a/494289

Delete DOS Characters via VIM (^M)
And in case you want to migrate back to, err.. MS-DOS: ":set ff=dos" does the opposite.

Remove \r (carriage return) in a file

Ping all hosts on 192.168.1.0/24
-b option takes the broadcast address.

Grep syslog today last hour
Uses date to grep de logfile for today and uses it to get the last hour logs. Can be used to get last minute logs or today's logs.

Mount iso to /mnt on Solaris
Unmount $ umount /mnt Delete loopback file device $ lofiadm -d /dev/lofi/1

print multiplication formulas
seq -s ' ' 1 9 | sed -n ':a;p;s/ *\w$//;h;/^$/t;b a;q' | tac | awk '{for(i=1;i

[vim] Clear a file in three characters (plus enter)
% selects every line in the file. 'd' deletes what's selected. It's a pretty simple combination.

check open ports without netstat or lsof


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: