User Tools

Site Tools


wiki:finding_files

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
wiki:finding_files [2020/04/29 18:29] walkeradminwiki:finding_files [2023/04/03 17:12] – [Overview] walkeradmin
Line 1: Line 1:
 ====== Finding Files ====== ====== Finding Files ======
 <color darkorange>Apr 2020</color> <color darkorange>Apr 2020</color>
 +<color darkorange>Updated Apr 2023</color>
 \\  \\ 
 \\  \\ 
Line 9: Line 10:
  
 One thing I have always struggled with is finding things in CentOS. So here I am going to put a few examples, and over time hopefully add some more. One thing I have always struggled with is finding things in CentOS. So here I am going to put a few examples, and over time hopefully add some more.
 +\\ 
 +\\ 
 +<color #ed1c24>If you are not 'root' then you can't search for any file/folder that requires root privileges.</color>
 \\  \\ 
 \\  \\ 
Line 16: Line 20:
  
 To find a file, use: <color #ed1c24>find / -file "install.sh"</color> To find a file, use: <color #ed1c24>find / -file "install.sh"</color>
 +I think -file should be - name: <color #ed1c24>find / -name "install.sh"</color>
 \\  \\ 
 \\  \\ 
Line 31: Line 36:
 \\  \\ 
 If you only wish to find folders then use -type d: <color #ed1c24>find / name home -type d</color> If you only wish to find folders then use -type d: <color #ed1c24>find / name home -type d</color>
 +\\ 
 +\\ 
 +If you are only interested in files created in the last 2 days use: <color #ed1c24>find / -name home -type d -mtime -2</color> This looks for folders called home created in the last 2 days.
 \\  \\ 
 \\  \\ 
  
wiki/finding_files.txt · Last modified: 2023/04/03 17:12 by walkeradmin