Commands by ene2002 (9)

  • see the partition Show Sample Output


    -4
    fdisk -l
    ene2002 · 2014-02-16 12:54:38 9

  • -2
    nmap -sS -O -v -oS - 192.168.2.0/24
    ene2002 · 2014-01-31 18:04:06 191
  • Watch a dig in progress Show Sample Output


    1
    watch -n1 dig google.com
    ene2002 · 2013-12-26 19:23:27 14
  • I wanted an easy way to list out the sizes of directories and all of the contents of those directories recursively. Show Sample Output


    1
    du -h --max-depth=1 /path/folder/
    ene2002 · 2013-07-09 19:56:13 106
  • UBNT iwlist command Show Sample Output


    -2
    iwlist ath0 scanning |egrep '(ESSID|Signal|Address)'| \sed -e 's/Cell - Address:*//g' -e 's/ESSID://g' \-e 's/Noise level=-//g' -e 's/dBm//g' \-e 's/Quality=*//g' -e 's/Signal level=-//g' \-e 's/"//g'
    ene2002 · 2013-05-04 08:48:45 20
  • This works just as well for SMTP. You could run this on your mail server to watch e-mail senders and recipients: tcpdump -l -s0 -w - tcp dst port 25 | strings | grep -i 'MAIL FROM\|RCPT TO' Show Sample Output


    4
    tcpdump -l -s0 -w - tcp dst port 25 | strings | grep -i 'MAIL FROM\|RCPT TO'
    ene2002 · 2013-03-18 18:55:20 186

  • 1
    nmap -T4 --script broadcast-pppoe-discover 192.168.122.0/24
    ene2002 · 2013-02-18 13:26:48 4

  • 0
    tcpdump -i eth0 -s 65535 -w test_capture
    ene2002 · 2013-02-07 19:29:02 5

  • 1
    tcpdump -i eth0 port http or port smtp or port imap or port pop3 -l -A | egrep -i 'pass=|pwd=|log=|login=|user=|username=|pw=|passw=|passwd=|password=|pass:|user:|userna me:|password:|login:|pass |user '
    ene2002 · 2013-02-07 19:14:58 5

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

Create package dependency graph
Create Debian package dependency graph using GraphViz

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

Delete all files older than X in given path
This will find all files under the path "." which are older than 10 days, and delete them. If you wish to use the "rm" command instead, replace "-delete" with "-exec rm [options] {} \;"

File rotation without rename command
Rotates log files with "gz"-extension in a directory for 7 days and enumerates the number in file name. i.e.: logfile.1.gz > logfile.2.gz I needed this line due to the limitations on AIX Unix systems which do not ship with the rename command.

Rename files in batch

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

background a wget download

Run a command as root, with a delay
$ sleep 1h ; sudo command or $ sudo sleep 1h ; sudo command won't work, because by the time the delay is up, sudo will want your password again.

convert png into jpg using imagemagick

Display a list of committers sorted by the frequency of commits
Use this command to find out a list of committers sorted by the frequency of commits.


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: