What is it, how does it work and how do I get to one.
Basic Navigation.
pwd
- Print Working Directory, outputs where the user is current atls
- outputs what’s in our current location;/
, that can be used to specify an absolute path; whereas a relative path specifies a location in relation to where we currently are in the system so /
is not needed~
- shortcut to home directory.
- reference to your current directory..
reference to the parent directory, ancestories can be tracked using ../../
etc.cd
- change directoryMore about Files.
' '
, or escape characters xx\ xx
Manual Pages.
man -k <search term>
; look up a specific command man <command>
, perform a serach for ‘term’ within the manual page /<term>
, and after performing a search within a manual page, the select the next found item n
File Manipulation. How to make, remove, rename, copy and move files and directories
mkdir
- to make a directorymkdir -p
- make parent directory as neededmkdir -pv
- make the directory and tell us what it’s doing
rmdir
- remove a directory, which also supports -v and -p options similarly to mkdir. Also the directory must be empty before it can be removedrm
- remove a filerm -r
- remove a non-empty directory
touch
- creating a blank filecp [options] <source> <destination>
- copying a file or directorymv [options] <source> <destination>
- moving a file or directorymkdir --> mv
- effectively rename a file or directoryCheatsheet2