2.2 Basic File Commands Flashcards
Characteristics of a Linux file system:
File system does not have a drive letter
Everything is considered as a file including directories and folders
The topmost directory is represented as ‘/’
What directory is the default directory when logging in to the terminal?
Home directory
What does ls -a do?
Lists all contents including hidden files and folders
What does ls -l do?
includes metadata
what does ls -h do?
Human readable file size, normally used together with -I
What does ls -d
list current directory, normally used with -l
what does ls -R
Recursive listing
What does ls -S do?
List sorted by size (Largest first)
What does ls -t do?
List sorted by modification timestamp (most recent first)
What are metacharacters?
- Can be used to specify patterns to match filenames in a directory
- Also referred to as “wildcards”
- Are interpreted by the shells first before running a command
What do these characters do?
- *
- ?
- []
- !
Represents zero or more of any character
Represents a single character
Represents range of characters
Used with [] to negate a range