Home > Unix > Unix useful commands

Unix useful commands

  1. ls -lrt
  2. Tail -10
  3. Find the biggest file under current mountpointfind . -name “*” -exec ls -l {} \;|awk ‘{print $5}’|sort
  4. create directories recursively
    mkdir -p /dir1/dir2/dir3
  5. Copy as well as make a compressed copy.
    cp -c /file1 /dir/file2.Z
  6. Kill LOCAL sessions before shutdown
    kill -9 `ps -ef|grep LOCAL|awk ‘{print $2}’
  7. removing  files date wise
    rm ls -l |grep ‘Jul  18’|awk ‘{print $NF}’​
Categories: Unix Tags:
  1. No comments yet.
  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 )

Facebook photo

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

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: