[ Find & Replace ]
# vim test.txt {then run below command}
:%s#string1#string2#g
# find ./ -type f -exec sed -i 's/string1/string2/g' {} \;
[ find & remove ]
# cd /tmp && find . -name '*' | xargs rm
# find /var/log/elasticsearch/snapshot -type d -exec chmod 755 {} \;
# find /var/log/elasticsearch/snapshot -type f -exec chmod 644 {} \;
[ find & replace blank spaces in notepad++ ]
https://superuser.com/questions/621720/remove-empty-lines-and-spaces-in-notepad
Go to Search -> Replace
Select "Regular expression" under Search mode.Nn Knows yn Shetty
Use ^\s* for "Find what" and leave "Replace with" blank.
Click Replace all
[ Find & Change Permission ]
[dir change permission]
#cd /tmp/
#find . -type d -exec chmod 755 {} \;
[files change permission]
#cd /tmp/
#find . -type f -exec chmod 644 {} \;
# vim test.txt {then run below command}
:%s#string1#string2#g
# find ./ -type f -exec sed -i 's/string1/string2/g' {} \;
[ find & remove ]
# cd /tmp && find . -name '*' | xargs rm
# find /var/log/elasticsearch/snapshot -type d -exec chmod 755 {} \;
# find /var/log/elasticsearch/snapshot -type f -exec chmod 644 {} \;
[ find & replace blank spaces in notepad++ ]
https://superuser.com/questions/621720/remove-empty-lines-and-spaces-in-notepad
Go to Search -> Replace
Select "Regular expression" under Search mode.Nn Knows yn Shetty
Use ^\s* for "Find what" and leave "Replace with" blank.
Click Replace all
[ Find & Change Permission ]
[dir change permission]
#cd /tmp/
#find . -type d -exec chmod 755 {} \;
[files change permission]
#cd /tmp/
#find . -type f -exec chmod 644 {} \;
No comments:
Post a Comment