Commands by harshh (0)

  • bash: commands not found

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

floating point operations in shell scripts
using bc is for sissies. dc is much better :-D Polish notation will rule the world...

Prepend a text to a file.
Syntax: $ prepend content to add [filename] Uses ed, so no temp files created.

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

IBM AIX: Extract a .tar.gz archive in one shot
This command is for UNIX OSes that have plain vanilla System V UNIX commands instead of their more functional GNU counterparts, such as IBM AIX.

analyze traffic remotely over ssh w/ wireshark
This captures traffic on a remote machine with tshark, sends the raw pcap data over the ssh link, and displays it in wireshark. Hitting ctrl+C will stop the capture and unfortunately close your wireshark window. This can be worked-around by passing -c # to tshark to only capture a certain # of packets, or redirecting the data through a named pipe rather than piping directly from ssh to wireshark. I recommend filtering as much as you can in the tshark command to conserve bandwidth. tshark can be replaced with tcpdump thusly: $ ssh root@example.com tcpdump -w - 'port !22' | wireshark -k -i -

Which processes are listening on a specific port (e.g. port 80)
swap out "80" for your port of interest. Can use port number or named ports e.g. "http"

rename / move Uppercase filenames to lowercase filenames current directory
move filename/rename filenames with Uppercase to lowercase in current directory

SSH Auto-login with password
You need to install "sshpass" for this to work. apt-get install sshpass

Prints line numbers
If you don't have nl on your system, this achieves a similar effect, the default behavior in nl is to not number blank lines, but this does.

rename anime fansubs
renames Anime Episodes to files, that can be parsed by sonarr & co


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: