Command Lines Flashcards
(27 cards)
Home Directory
~
present working directory
pwd
shows the physical pathway
-P
see files in current directory
ls
see both “visible” and “hidden” files and directories.
-a
flag that will list out the names of the files and directories as well as give more detailed information about them.
-l
shows file size
-h
sorts by file size
-S
Sorting by Last Modified Time
-t
reverse sort
-r
create a link between two files
ln
If the source file already exists when linking files you will get an error, how do you fix the error and force link the files
-f
link a directory
-s
change directory
cd
Once inside of a directory, it can be useful to be able to navigate back up a directory. One way to do this would be to call cd giving it the full path to the directory you want to go. Another way to accomplish the task of moving up to the parent directory is to use the special path
. .
how to create a directory
mkdir directory name
make a nested directory
-p
How to copy a single file
To copy a single file we can call the cp command with two arguments. The first argument is the file we want to copy, the source file. The second argument, or target, is the location we want to copy the source file t
when you copy multiple files, the last argument must be a
directory
what does verbose output do and how do you enter it
-v; it shows you the steps taken to complete a command
how do you copy a directory?
-R
how do you force overwrite
-f
how do you confirm overwrite?
-i
how do you delete a file?
-rm