Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| en:tools:linux:file-handling [2023/09/30 14:28] – crunchyslime | en:tools:linux:file-handling [2023/10/25 12:01] (current) – admin | ||
|---|---|---|---|
| Line 92: | Line 92: | ||
| ==== copy while preserving arborescence ==== | ==== copy while preserving arborescence ==== | ||
| - | [[source|https:// | + | [[https:// |
| - | <bash code> | + | < |
| * '' | * '' | ||
| Line 107: | Line 107: | ||
| ==== recursively copy all files without preserving the file tree ==== | ==== recursively copy all files without preserving the file tree ==== | ||
| - | <bash code> | + | < |
| Here we are at the root of the file tree to explore and the destination folder is '' | Here we are at the root of the file tree to explore and the destination folder is '' | ||
| Line 113: | Line 113: | ||
| ==== list the differences between two directories ==== | ==== list the differences between two directories ==== | ||
| count the differences | count the differences | ||
| - | <bash code> | + | < |
| list the differences in diff.log | list the differences in diff.log | ||
| - | <bash code> | + | < |
| adding '' | adding '' | ||
| Line 122: | Line 122: | ||
| ==== list the duplicates ==== | ==== list the duplicates ==== | ||
| [[https:// | [[https:// | ||
| - | *detect duplicates* | + | |
| - | <bashcode>fdupes -Sr .</ | + | **detect duplicates** |
| + | |||
| + | <code bash>fdupes -Sr .</ | ||
| + | |||
| + | ==== Disk usage ==== | ||
| + | Usefull commands : | ||
| + | <code bash> | ||
| + | #liste the 30 largest files in filetree | ||
| + | du -Sh | sort -rh | head -30</ | ||
| + | <code bash> | ||
| + | #ncurse disk usage | ||
| + | ncdu | ||
| + | #on remote system | ||
| + | ssh -C user@system ncdu -o- / | ./ncdu -f- | ||
| + | </ | ||