Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| linux:file_operations [2017/05/02 17:41] – [Find Directories Containing Specified File Glob] mgupton | linux:file_operations [2022/08/19 19:26] (current) – [Mount CIFS/SMB Share] mgupton | ||
|---|---|---|---|
| Line 2: | Line 2: | ||
| =====Find Directories Containing Specified File Glob===== | =====Find Directories Containing Specified File Glob===== | ||
| For example, find directories containing Python source files. | For example, find directories containing Python source files. | ||
| - | < | + | < |
| find /c/home/db/ -type f -name ' | find /c/home/db/ -type f -name ' | ||
| </ | </ | ||
| Line 8: | Line 8: | ||
| * '' | * '' | ||
| * For each file path '' | * For each file path '' | ||
| + | |||
| + | Find all the directories containing *.py files modified in the last 15 minutes. | ||
| + | <code bash> | ||
| + | find /c/home/db/ -mmin -15 -type f -name ' | ||
| + | </ | ||
| + | |||
| + | Find all the directories containing *.py files modified in the last 7 days. | ||
| + | * This is helpful finding the recent things that have been worked on. | ||
| + | <code bash> | ||
| + | find /c/home/db/ -mtime -7 -type f -name ' | ||
| + | </ | ||
| + | |||
| + | List all directories modified in the last 7 days. | ||
| + | <code bash> | ||
| + | find ./ -mtime -7 -type d | ||
| + | </ | ||
| + | |||
| + | Limit the recursion to only show directories in the current directory. | ||
| + | <code bash> | ||
| + | find ./ -maxdepth 1 -mtime -7 -type d | ||
| + | </ | ||
| + | |||
| + | <code bash> | ||
| + | find ./ -maxdepth 1 -type d -mtime -7 | xargs -I {} ls -dhl {} | ||
| + | </ | ||
| + | |||
| + | ===== Mount CIFS/SMB Share ===== | ||
| + | <code bash> | ||
| + | sudo mount -t cifs -o username=admin, | ||
| + | </ | ||