ScrPtS-Mics


# find /test -type f -exec sed -i 's/ugly/beautiful/g' {} \; --- Replace the word ugly to beautiful from all the files in the Directory "/test" and save the same.

# find /etc -type f -exec grep -ilw "/run" {} \; --- Find all files which contains the word "/run" in /etc directory

# scp -v $(find /var/cache/yum -name *.rpm) root@200.0.0.10:/Softwares/Packages --- Copy rpm's to remote system

# echo 'egrep -v "^#|^$" $1' > uv;chmod +x uv;ln -s /root/uv /bin/uv --- New uv command to remove # and blank lines

# echo -e 'for i in $(ls /var/log/{nova,neutron}/*)\ndo\n>$i\ndone' >cleanlog.sh --- Script using echo command