kevinlinxp
12/31/2016 - 6:00 AM

CMD:find

CMD:find

find <path> -type f -not -name "*uncompressed.js" -name "*.js" -exec rm "{}" \;
find /opt/eclipse -user linke -exec rm -rf "{}" \;
find / -type f -perm -4000 -exec ls -l "{}" \;
find / -type f -name mysql* -exec cp "{}" . \;
find . -type f -exec cat "{}" \; | grep alias

# Note:
# The braces are enclosed in single quote marks to protect them from interpretation as shell script punctuation. The semicolon is similarly protected by the use of a backslash, though single quotes could have been used in that case also.

find . -type d -exec chmod +rwx,o-rwx "{}" +
find . -type f -exec chmod -rwx,u+rw "{}" +

# Note:
# "+" means append file founded to the end, more effective.