Commands by evolix (4)

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 files with the same names in several directories.
cat file1 file2 file3|sort|uniq -d finds the same lines in several files, especially in files with lists of files.

Trojan inverse shell
To connect to the shell run: $ nc server.example.org 2000

See where a shortened url takes you before click

Remove a line from a file using sed (useful for updating known SSH server keys when they change)

Get Cisco network information
This gives you lots of nifty Cisco network information like VLAN tag, port and switch information.

renice by name

Kill all processes belonging to a single user.

Extract neatly a rar compressed file
It's also possible to delay the extraction (echo "unrar e ... fi" |at now+20 minutes) wich is really convenient!

Create backup copy of file, adding suffix of the date of the file modification (NOT today's date)

Print process run time, average CPU usage, and maximum memory usage on exit
Bash has a built-in time command which provides less functionality than the real time command. Thus we reference /usr/bin/time directly. Since the command isn't very easy to remember you could alias it to something like "cputime" or even just "time".


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: