linux:start
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
linux:start [2023-09-25 20:30] – dave | linux:start [2024-02-27 15:19] (current) – dave | ||
---|---|---|---|
Line 5: | Line 5: | ||
* [[inputrc]] | * [[inputrc]] | ||
* [[Services]] | * [[Services]] | ||
+ | * [[rclone]] | ||
----------------------- | ----------------------- | ||
Line 19: | Line 20: | ||
</ | </ | ||
----------------------- | ----------------------- | ||
+ | ===== Date ===== | ||
+ | My preferred date/time format is ISO 8601. | ||
+ | < | ||
+ | Can also be accomplished with... | ||
+ | < | ||
+ | Specific timezone and 3 hours in the future... | ||
+ | < | ||
+ | ----------------------- | ||
+ | ===== Find ===== | ||
+ | I never remember how to find old files... either of these will work. The second one uses minutes (I don't know why you'd want to) and shows how to exclude files. | ||
+ | find DIR -name " | ||
+ | find . ! -name ' | ||
+ | Add this to the end and anything that matches will be deleted. | ||
+ | < | ||
+ | -exec rm -f {} \; | ||
+ | </ | ||
+ | Limit depth to current directory. | ||
+ | < | ||
+ | find . -maxdepth 1 -name " | ||
+ | </ | ||
+ | |||
+ | # to delete empty dirs | ||
+ | < | ||
+ | find -type d -empty -delete | ||
+ | </ | ||
+ | # to delete files over some age & empty dirs | ||
+ | < | ||
+ | find /some/path -depth \( \( -type f -daystart -mtime +100 \) -o -type d -empty \) -ls | ||
+ | </ | ||
+ | |||
+ | ----------------------- | ||
+ | ===== Find the Fat Folder ===== | ||
+ | Useful for finding which directory is sucking up all your disk space. | ||
+ | < | ||
+ | du -h --max-depth=1 | sort -hr | ||
+ | </ | ||
linux/start.1695673826.txt.gz · Last modified: 2023-09-25 20:30 by dave