Commands by maffo7 (2)

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

list file descriptors opened by a process
Useful for examining hostile processes (backdoors,proxies)

intercept stdout/stderr of another process
similar to the previous command, but with more friendly output (tested on linux)

Email a file to yourself
This works on Solaris 10.

mount an iso
mounts an ISO file to a directory on the target file system

Notepad in a browser (type this in the URL bar)
It doesn't save your notes, but it's great for jotting something down quickly.

Send an email from the terminal when job finishes
Might as well include the status code it exited with so you know right away if it failed or not.

Restart openssh-server on your Synology NAS from commandline.
The correct way to restart openssh-server on your synology nas.

Update zone file Serial numbers
Will edit *.db files in the same directory with todays date. Useful for doing a mass update to domains on a nameserver, adding spf records, etc. Looks for a string starting with 200 or 201 followed by 7 numbers, and replaces with todays date. This won't overwrite Ip's but i would still do some double checking after running this. Make sure your server's date is correct, otherwise insert your own serial number. $rndc reload should usually follow this command.

Printing multiple years with Unix cal command
print multiple increasing years using cal - calendar -. You can also try $seq Start Increment End

run command on a group of nodes in parallel redirecting outputs
Do the same as pssh, just in shell syntax. Put your hosts in hostlist, one per line. Command outputs are gathered in output and error directories.


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: