1.
Top
5 memory consumption process.
ps aux --sort=-%mem |
awk 'NR<=10{print $0}'
2.
Count
number of files which are in directory.
ls -1 |
wc –l
3.
Find
specific word from folder
grep -Rw
/usr/sap/SID/DVEBMGS00/work/ -e 'error'
4.
Find
specific word from folder
grep
"redeem reward" /home/tom/*.txt
Or
grep
"redeem reward" ~/*.txt
5.
Copy file
from one path to other
scp -r
Filename OSUserID@IP:Path
Example
scp -r
CSR0120031469_0092937.PAT sidadm@10.11.12.13:/usr/sap/trans/EPS/in
6.
Delete files before
certain days
find /backup/SID/log
-mtime +5 -exec rm {} \;
7.
Find files before
certain days
find /backup/SID/log
-mtime +90 –print
8.
Take output of any
command to file
Df –Ph >> xyz
x
No comments:
Post a Comment