find Flashcards
memorise and start to use these very useful command.
1
Q
Find directories with 777 permissions and change the permissions to 755 in the current directory?
A
find . -type d -perm 777 -exec chmod 777 {} \;
2
Q
Find all the empty files in the current directory and delete them:
A
find . -type f -empty -print -exec rm -f {} \;
3
Q
Find all the files which are larger than 50MB but smaller than 100MB in the current directory
A
find . -type f -size +50M -size -100M
4
Q
find and delete all the .mp4 files on your system which are larger than 1GB
A
find . -name ‘*.mp4’ -size +1000M -print rm -f {} \;