####################### # getting help ####################### # where are we? get-location # windows style pwd # Powershell being somewhat compatible with UNIX # getting help for a command get-help pwd man pwd # manual pages ####################### # keyboard shortcuts ####################### # autocomplete, cancel, history get- control-C: kill up arrow key: history control-R: history history history | tail ####################### # home directory and desktop ####################### cd ~ pwd cd Desktop ls ####################### # new directory ####################### cd examples # doesn't exist # does not exist, so create it mkdir examples cd examples # we can get back to this by hitting the up arrow pwd ####################### # different paths for the same file ####################### cd ~\Desktop\examples # powershell accepts slashes in either direction pwd cd c:\Users\test3\Desktop\examples # absolute path pwd cd ..\examples # relative path pwd ####################### # reading and writing files ####################### echo howdy echo howdy > file.txt ls cat file.txt notepad file.txt # and edit something cat file.txt echo line2 > file.txt cat file.txt echo line3 >> file.txt cat file.txt ####################### # moving+copying ####################### pushd . #pushes the current directory into stack popd #removes the topmost directory from the stack cp file.txt file-copy.txt ls cat file-copy.txt mv file-copy file-v2.txt ls