Commands by lucasjr76 (1)

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

phpinfo from the command line
php -i seems to show default not real

E-mail a traditional Berkeley mbox to another recipient as individual e-mails.

Get video information with ffmpeg
I used an flv in my example, but it'll work on any file ffmpeg supports. It says it wants an output file, but it tells what you want to know without one.

MoscowML with editable input-line and history
Works also with SML/NJ and other interpreters or tools with interactive environments.

Open Finder from the current Terminal location
I did not know this, i'd like to share...

List .log files open by a pid
Uses lsof to display the full path of ".log" files opened by a specified PID.

Determine the version of a specific package with RPM
In this case, I'm getting the package version for 'redhat-release', but of course, this can be applied to any package installed on the filesystem. This is very handy in scripts that need to determine just the version of the package, without the package name and all the sed and grep hackery to get to the data you want. To find out all the support format strings that 'rpm --qf' supports: $ rpm --querytags

Backup with versioning
Apart from an exact copy of your recent contents, also keep all earlier versions of files and folders that were modified or deleted. Inspired by the excellent EVACopy http://evacopy.sourceforge.net

list block devices
Shows all block devices in a tree with descruptions of what they are.

auto terminal title change
above line in .bash_profile will give you window title in putty or terminal client when you login to your remote server


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: