Commands using grep (1,935)

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

Processes by CPU usage

Advanced python tracing
Trace python statement execution and syscalls invoked during that simultaneously

Translate your terminal into Swedish Chef
Bork, bork, bork! To keep it short, the first terminal line doesn't show a prompt.

Resize A Mounted EXT3 File System
Live extension of an ext3 file system on logical volume $v by 200GB without the need to unmount/remount. Requires that you have 1) a version of resize2fs that contains code merged from ext2online, and 2) kernel support for online resizing. (e.g. RHEL 5)

Debug bash shell scripts.
Display commands and their arguments as they are executed. Useful for debugging shell scripts.

Create a mirror of a local folder, on a remote server
Create a exact mirror of the local folder "/root/files", on remote server 'remote_server' using SSH command (listening on port 22) (all files & folders on destination server/folder will be deleted)

Get Unique Hostnames from Apache Config Files
Get a list of all the unique hostnames from the apache configuration files. Handy to see what sites are running on a server. A slightly shorter version.

Quickly create simple text file from command line w/o using vi/emacs
1. Issue command 2. After angled bracket appears, enter file contents 3. When done, type "EOF"

Determine next available UID
Typical usage would be in a script that would want the next open UID in a range (in this case 500-600)

find out how many days since given date
You can also do this for seconds, minutes, hours, etc... Can't use dates before the epoch, though.


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: