Commands tagged nohup (9)

What's this? 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

Check syntax of all Perl modules or scripts underneath the current directory
Finds all *.p[ml]-files and runs a perl -c on them, checking whether Perl thinks they are syntactically correct

Benchmark SQL Query
Benchmark a SQL query against MySQL Server. The example runs the query 10 times, and you get the average runtime in the output. To ensure that the query does not get cached, use `RESET QUERY CACHE;` on top in the query file.

Download SSL server certificate with opsnessl
Useful when we need to create new certificate for site when current one is near expiry. This downloaded cert can be used to provide organisational data directly to new cert. using below command. e.g. openssl x509 -x509toreq -in /tmp/ -out -signkey

Comma insertions
Insert a comma where necessary when counting large numbers. I needed to separate huge amounts of packets and after 12+ hours of looking in a terminal, I wanted it in readable form.

Extract audio stream from an video file using mencoder
This command extracts the audio stream of the video in $file and stores it in a file where the original suffix is changed to .mp3

convert a mp4 video file to mp3 audio file (multiple files)

put command in a loop to keep trying a connection
This will keep trying to reconnect your netcat connection can be used with SSH or Telnet, just substitute nc for ssh or telnet very useful for troubleshooting VPNs were you want to send continuous packets towards a destination to trace.

create an incremental backup of a directory using hard links
dname is a directory named something like 20090803 for Aug 3, 2009. lastbackup is a soft link to the last backup made - say 20090802. $folder is the folder being backed up. Because this uses hard linking, files that already exist and haven't changed take up almost no space yet each date directory has a kind of "snapshot" of that day's files. Naturally, lastbackup needs to be updated after this operation. I must say that I can't take credit for this gem; I picked it up from somewhere on the net so long ago I don't remember where from anymore. Ah, well... Systems that are only somewhat slicker than this costs hundreds or even thousands of dollars - but we're HACKERS! We don't need no steenkin' commercial software... :)

Generate a binary file with all ones (0xff) in it
This is similar to how you would generate a file with all zeros $ dd if=/dev/zero of=allzeros bs=1024 count=2k

Grep for word in directory (recursive)
greps for search word in directory and below (defaults to cd). -i case insensitive -n shows line number -H shows file name

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.


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: