File tree Expand file tree Collapse file tree 2 files changed +34
-4
lines changed
Expand file tree Collapse file tree 2 files changed +34
-4
lines changed Original file line number Diff line number Diff line change 1+ # CLEANUP
2+
3+ ` .terraform ` and ` node_modules ` folders.
4+
5+ ## Find
6+
7+ Find folders and remove them.
8+
9+ ``` sh
10+ FOLDER_NAME=" .terraform"
11+ FOLDER_NAME=" node_modules"
12+
13+ find ./ -iname " ${FOLDER_NAME} " -type d -exec echo {} \;
14+
15+ # show size first
16+ find ./ -iname " ${FOLDER_NAME} " | xargs gdu -sh
17+ ```
18+
19+ ## Remove
20+
21+ Remove folders that use a huge amount of space for providers.
22+
23+ ``` sh
24+ find ./ -iname " ${FOLDER_NAME} " -type d -exec rm -r {} \;
25+ ```
26+
27+ ## Resources
Original file line number Diff line number Diff line change 11# DISK USAGE
22
3- Demonstrate some examples of calculating disk usage.
3+ Demonstrate some examples of calculating disk usage.
44
55## gdu
66
@@ -10,12 +10,15 @@ Uses SSD parallel reads to rapidly summarise folder sizes.
1010nix-shell -p gdu --command zsh
1111
1212gdu
13+
14+ # disk usage (depth 1)q
15+ gdu -h -d1 ./
1316```
1417
1518## Space
1619
1720``` sh
18- # find files or folders and show disk space used for them.
21+ # find files or folders and show disk space used for them.
1922find /output -iname " share" -or -iname " include" | xargs du -sh
2023
2124# summarise each folder (depth 1)
@@ -24,12 +27,12 @@ echo ../* | du -h -d1
2427
2528## inodes
2629
27- You can change the number of inodes when creating the filesystem.
30+ You can change the number of inodes when creating the filesystem.
2831
2932``` sh
3033df -i
3134```
3235
3336## Resources
3437
35- * Pretty fast disk usage analyzer written in Go. [ here] ( https://github.com/dundee/gdu )
38+ - Pretty fast disk usage analyzer written in Go. [ here] ( https://github.com/dundee/gdu )
You can’t perform that action at this time.
0 commit comments