Most Wanted Commands


Most wanted linux commads of me

– find file_name.file_type with match words on foo directory.

# find /foo -name "file_name.file_type" -exec grep -iH "words" {} \;

– view state ip and port connections with netstat

# netstat -nta

– view folder or directory usage

# du -sh /foo

– change password mysql user via console (mysql prompt)

UPDATE mysql.user SET Password=PASSWORD('MyNewPass') WHERE User='root';
FLUSH PRIVILEGES;

– replace words on vi editor

:%s/foo/text_words

– converting pdf file on current directory to text

# find *.pdf | sed "s/^/\'/;s/$/\'/" | awk -F. '{print "pdftotext " $0}' | sh

– Mass rename file or folder foo to foo1 on directory boo

find /boo | perl -ne'chomp; next unless -e; $oldname = $_; s/foo/foo1/; next if -e; rename $oldname, $_'

credits:
– man vi
– man netstat
– man find
– man du
– man sed
– man awk
digit
shell-fu

  1. July 24, 2009 at 12:50 am

    hai pa’ 😀 sblm bobo mampir dulu liat2,

    “converting pdf” wow mantap. knp tdk terpikir oleh sy 😀 kolaborasi sed dan pdftotext.

    regards

    • July 25, 2009 at 1:21 pm

      hi jg 😀 .. monggo

      hehe.. itu juga ga kepikiran koq, awalnya ada temen yg lagi dpt kasus… waktu itu command yg aq kasih k tmnku lum sempurna.. terus di terusin ma tmenna 😀 ..
      coba liat historinya di tempat tmenku … 😀

  2. August 9, 2009 at 4:32 pm

    Baru ganti nih. Udah masuk. 😀

    Suwun atas kontrakannya. 😀

    Oia, kalo mau yang hot dari shell fu. Maknyus. Command Command handal uakeeehhh

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s