Monday, July 25, 2016

Move & gzip files which has space in name

Used below command for zip 

for i in `ls -ltrh | awk {'print $9'} | sed 's/\ /\\\ /g` ; do gzip $i ; done



Move 60000 logs or files

 mv `ls -lrth | head -n 60000 | awk {'print $9'}` /mnt/archive_logs/192.168.10.81/re1_9/  

No comments:

Post a Comment