Mournova
COMMAND LINE CHEAT SHEET
oes TOWER ~ the most powerful Git client for Mac
DIRECTORIES
5 pwd
Display path of current working directory
§ od directory>
Change directory to edirectory>
tal
Navigate to parent directory
sls
List directory contents
gis aa
List detailed directory contents, including
hidden files
$ mkdir
Create new directory named
OUTPUT
5 cat file
Output the contents of
5 less
Output the contents of using
the less command (which supports,
pagination etc)
45 head
‘Output the frst 10 lines of
45 >
Direct the output of into
5 >>
‘Append the output of
4 |
Direct the output of
$ clear
Clear the command line window
30-day fee tial avaliable at
wiv it tener com
FILES
5 mm
Delete
§ rm
Delete
$m -f file
Force-delete (add -r to force-
delete a itectory)
§ ay cfile-old> to
Move ta directory (possibly
overwriting an existing file)
§ ep
Copy (possibly
overwriting an existing file)
§ cp -r
“directory
Copy and its contents to
(possibly overwriting Mies
Inan existing director)
§ touch
Update file acess & modification time
(an create if doesn’t exist)
Parsee
§ chnod 755
Change permissions of to 755
§ chnod -R 689
Change permissions of (and
its contents) 0 600
chown :
Change onnesship of to
and egroup> (add -Rto include a
divectony's contents)
§ Find -nane “
Find all files named inside
(use wildcards [+ to search for parts of
filenames, eg. "file.*")
§ grep “*
Output ll occurrences of text> inside
(add -1 for case-insonsitivity)
§ grep -rl “
Search forall files containing text>
Inside
ar
5 ping
Bing chost> and display status
$ whois
$ curl -0
Download via HTTP{S] or FTP)
§ ssh cusernanes@chost>
Establish an SSH connection to
with user
§ sp
‘aisers@chost>: /renote/path
Copy to 2 remote chost>
§ ps ax
(Output currently running processes
$ top
Display live information about currently
sunning processes
s Kill
(Quit process with In