1/34
Vocabulary flashcards covering key terms and commands from Memory Exercise 1: Paths, basic commands.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
Pathname
A route through the Unix file system tree to a directory or file.
Absolute pathname
Starts at the root directory.
Root directory
The starting point of the file system; symbol is /.
Slash
The symbol that represents the root directory in Unix.
Absolute path names start with
A forward slash (/) indicates an absolute path.
Relative path names start at
The working directory (current directory).
Working directory
The directory you are currently in.
Relative pathname
A path that does not start with /; it is relative to the current working directory.
Absolute path to Joe's music directory
/home/joe/music
The absolute path example
/home/joe/music (example value of an absolute path).
The relative path to Joe's music directory
music.
The relative path example
music (as a path from Joe's home directory).
Hidden files start with
A dot (.) at the start of the filename.
ls
List directory contents; by default, shows file names only.
ls -l
List directory contents in long format with permissions, size, timestamps, etc.
ls -A
List directory contents including hidden files.
touch file1
Create a new empty file named file1.
touch existing_file
Update the timestamp on an existing file named existing_file.
vi (vim) file1
Edit file1; creates it if it does not exist.
cat file1
Display the contents of file1 as a text stream.
cat file1 file2
Display the contents of file1 and file2 (concatenate and show).
more file1
Display file1 one page at a time (older pager).
less file1
Display file1 one page at a time (modern pager).
head file1
Show the first 10 lines of file1.
tail file1
Show the last 10 lines of file1.
pwd
Print the current working directory.
mkdir new_dir
Create a directory named new_dir.
cd new_dir
Change the working directory to new_dir.
rmdir empty_dir
Remove an empty directory named empty_dir.
rm -ri full_dir
Remove a directory that has files in it, with interactive prompts.
cp file1 file2
Copy file1 to file2.
mv file3 new_name
Rename file3 to new_name.
mv file4 diff_dir
Move file4 from the current directory to the directory named diff_dir.
rm file5
Delete file5.
man command
Look up the online manual page for a command.