Commands using export (101)

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

do a full file listing of every file found with locate

Create subversion undo point
Allows you to save progress without committing. To revert to an undo point, svn revert then apply the undo point with patch. $ svn revert -R . && patch -p0 < .undo/2009-03-27_08:08:11rev57 Similar: http://www.commandlinefu.com/commands/view/373/archive-all-files-containing-local-changes-svn

Combine cssh and shell expansion to execute commands on a large cluster
This will open an awful lot of little windows, but is quite useful if you want to quickly patch something on a cluster of servers.

Convert CSV to JSON
Replace 'csv_file.csv' with your filename.

How to get an absolute value
Whenever we are only interested in difference between two numbers and not the positive/negative values we can use this in script.

Display PHP files that directly instantiate a given class
This greps all PHP files for a given classname and displays both the file and the usage.

Find usb device in realtime
Using this command you can track a moment when usb device was attached.

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

Retrofit a shebang to an existing script
Function to add a shebang to an existing script, handy if you forgot to add it in the first place.

python smtp server
This command will start a simple SMTP server listening on port 1025 of localhost. This server simply prints to standard output all email headers and the email body.


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: