Commands by dramaturg (3)

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

Count number of files in a directory

Synchronize date and time with a server over ssh
Shorter, easier to remember version of cmd#7636 NTP is better, but there are situations where it can't be used. In those cases, you can do this to sync the local time to a server.

Use last argument of last command
Bash shortcut to work with the last argument of your last command

convert pdf to graphic file format (jpg , png , tiff ... )
need imagemagick package

get header and footer of file for use with scalpel file carving
file carving helps if you know where the file you are looking for starts and ends. It's also an easy way to get data and catalog them for future use with forensic tools like scalpel.

Copy file content to X clipboard
(only when vim has been compiled with +clipboard)

Get the IP address of a machine. Just the IP, no junk.

Comment current line
This should work with different locales. Another post reports

MSDOS command to check existance of command and exit batch if failed
This is a command to be used inside of MS-DOS batch files to check existence of commands as preconditions before actual batch processing can be started. If the command is found, batch script continues execution. If not, a message is printed on screen, script then waits for user pressing a key and exits. An error message of the command itself is suppressed for clarity purpose.

find the path of the java called from the command line
The output will likely point to '/etc/alternatives/java'. So find out where that points by issuing ls -l like this: ls -l /etc/alternatives/java


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: