Archive
Archive for the ‘Unix’ Category
Unix useful commands
July 28, 2017
Leave a comment
- ls -lrt
- Tail -10
- Find the biggest file under current mountpointfind . -name “*” -exec ls -l {} \;|awk ‘{print $5}’|sort
- create directories recursively
mkdir -p /dir1/dir2/dir3 - Copy as well as make a compressed copy.
cp -c /file1 /dir/file2.Z - Kill LOCAL sessions before shutdown
kill -9 `ps -ef|grep LOCAL|awk ‘{print $2}’ - removing files date wise
rm ls -l |grep ‘Jul 18’|awk ‘{print $NF}’