Chapter 3: Managing Files, Directories, and Text Flashcards
ls
list command
pwd
present working directory
ls -a
Display all file and subdirectory names, including hidden files’ names.
ls -d
Show a directory’s own metadata instead of its contents.
ls -F
Classify each file’s type using an indicator code (*,/,=,>,@, or |).
ls -i
Display all file and subdirectory names along with their associated index number.
ls -l
Display file and subdirectory metadata, which includes file type, file access permissions, hard link count, file owner, file’s group, modification date and time, and file name.
ls -R
Show a directory’s contents, and for any subdirectory within the original directory tree, consecutively show their contents as well (recursively).
touch
The touch command will allow you to create empty files on the fly
Which command creates directories?
mkdir
How do copy a file or directory locally?
use the cp command
cp -a
Perform a recursive copy and keep all the files’ original attributes, such as permissions, ownership, and timestamps
cp -f
Overwrite any preexisting destination files with same name as DEST.
cp -i
Ask before overwriting any preexisting destination files with same name as DEST
cp -n
Do not overwrite any preexisting destination files with same name as DEST