Archive

Archive for the ‘Unix’ Category

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: