Help shape GoConqr. What should we add next?

Flashcards

Ch 2.9 Search for files

Archimed Nemes KodeKloud - Linux Easy English 33 cards

Cards in this deck (33)

  1. 1Search for test.txt in /usr/ directoryfind /usr/ -name test.txt
  2. 2Search for test.txt in current directoryfind -name test.txt
  3. 3Find files modified 5 minutes agofind -mmin 5
  4. 4Find files modified for past 5 minutesfind -mmin -5
  5. 5Find files modified before 5 minute agofind -mmin +5
  6. 6Find files modified past 24-hourfind -mtime 0
  7. 7Find files modified between 24 and 48 hours agofind -mtime 1
  8. 8Find files metadata of which changed 10 minutes agofind -cmin 10
  9. 9Find files with 512 kb sizefind -size 512k
  10. 10Find files with 120 bytesfind -size 120c
  11. 11Find files with size greate than 2Mbfind -size +2M
  12. 12Find files with size less than 3Gbfind -size -3G
  13. 13Find files which is either 512 kb or starts with cfind -size 512k -o -name "c*"
  14. 14Find files which is 1 Gb and starts with cfind -size 1G -name "c*"
  15. 15Find files which do not start with l (show two ways)find -not -name "l*"
    find \! -name "l*"
  16. 16Find all files with following permissions: r-xrw-r-- (write in numbers)find -perm 564
  17. 17Find all files with following permissions: at least rwxrw-rw- (write in numbers)find -perm -766
  18. 18Find all files with any of the following permissions: rw-rw-rw- (write in numbers)find -perm /666
  19. 19Find all files with following permissions: rwxrw-rw-- (write in letters)find -perm u=rwx,g=rw,o=rw
  20. 20Find all files with following permissions: at least r-xrw-rw- (write in letters)find -perm -u=rx,g=rw,o=rw
  21. 21Find all files with any of the following permissions: -wxrw--w- (write in letters)find -perm /u=wx,g=rw,o=w
  22. 22Find files that others cannot readfind \! -perm -o=r
  23. 23Find files/directories under /var/log/ directory that the group can write to, but others cannot read or write to it.sudo find /var/log/ -perm -g=w ! -perm /o=rw
  24. 24Add the permissions for setuid, setgid and sticky bit on /home/bob/datadir directory.chmod u+s,g+s,o+t /home/bob/datadir
  25. 25Find all directories named pets in /var/directory and save the output (along with directory path) in /home/bob/pets.txt file.sudo find /var/ -type d -name pets > /home/bob/pets.txt
  26. 26Find all the files whose permissions are 0777 in /var directory.sudo find /var -type f -perm 0777 -print
  27. 27Find all the files whose permissions are 0640 in /usr/ directorysudo find /usr -type f -perm 0640
  28. 28Find all the files which have been modified in the last 2 hours in /usr directory.sudo find /usr -type f -mmin -120
  29. 29Find all the files with size 20MB in /var directory.sudo find /var -type f -size 20M
  30. 30Find all files between 5mb and 10mb in the /usr directorysudo find /usr -type f -size +5M -size -10M
  31. 31Create a directory named LFCS under bob's home directory and update its user owner permissions to only x (execute), and group and others should not have any permissions.sudo mkdir /home/bob/LFCS
    sudo chmod 0100 /home/bob/LFCS
  32. 32Update the permissions for some_directory to rwxr-xr-xchmod 0755 some_directory/
  33. 33Find file named boyukherf.txt irrespective of case (so boyukherf, Boyukherf, BoyukHerf)find -iname boyukherf.txt

Information

Description
Easy KodeKloud - Linux Flashcards on Ch 2.9 Search for files, created by Archimed Nemes on 21/04/2022.
Created by
Archimed Nemes
Views
2
Rating

More on Linux File Management and Permissions

Feedback

What is it about?

What should we add next?