Trace:

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
linux:bash [2023/01/26 20:13] – [Search for files and chown them] adminlinux:bash [2023/01/26 20:16] (current) admin
Line 13: Line 13:
  
 </html> </html>
- 
----- 
  
 ==== Search for files and chown them ==== ==== Search for files and chown them ====
Line 20: Line 18:
 find . -type f -not \( -name "file1.txt" -o -name "file2.lol" -o -name "file3.\*" \) -print0 | xargs -0 chown [username] find . -type f -not \( -name "file1.txt" -o -name "file2.lol" -o -name "file3.\*" \) -print0 | xargs -0 chown [username]
  
 +----
  
-----+===== Find files containing text ===== 
 + 
 +<code bash>grep -rwl "search-string" /path/to/serch/dir</code>
  
 ===== Working with external storage ===== ===== Working with external storage =====