Skip to content

Latest commit

 

History

History
35 lines (25 loc) · 1.01 KB

unix.md

File metadata and controls

35 lines (25 loc) · 1.01 KB

Unix/Unix-like

List files/processes on port 80:

sudo lsof -Pni | grep :80

Remove .DS_Store files from the current and descendant folders:

find . -name '.DS_Store' -type f -delete

Get the size of a file/folder:

du --summarize --human-readable <file/folder path>
du -sh <file/folder path>

List out dependencies in node_modules sorted (descending) by disk space size:

du --summarize --human-readable ./node_modules/* | sort --numeric-sort --reverse | grep --perl-regexp --color=never '\dM.*'
du -sh ./node_modules/* | sort -nr | grep -P --color=never '\dM.*'

Links