Useful Linux/OSX Command Reference
 Share
The version of the browser you are using is no longer supported. Please upgrade to a supported browser.Dismiss

 
View only
 
 
ABCDEFGHIJKLMNOPQRST
1
ActionCommandNotes
2
Size & Space
3
Size of current folder (including subfolders)du -hs
4
Size of current subfolders & itemsdu -hs *
5
Size of current subfolders & items sorted with biggest items at the enddu -hs * | sort -h
6
Disk free spacedf -h
7
Structure
8
Show current folder structurefind -type d | sort
9
Show current folder structure while removing a pattern (such as .git)find -type d | grep -v .git | sort
10
Enviornment
11
Show the type of shell you are using (such as bash)echo $0
12
Process
13
Show zombie processesps aux | awk '{ print $8 " " $2 }' | grep -w Z
14
SSHFS
15
Mount a remote file system to a local directorysshfs root@python1.jwd.me:/srv/flask/ziptrades /tmp/ziptradesMake sure the mount point already exists (ie mkdir)
16
Unmount a remote filesystem (OSX only)umount /tmp/ziptrades
17
Line endings
18
Find CRLF line endingsfind . -not -type d -exec file "{}" ";" | grep CRLF
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
Loading...
 
 
 
Sheet1