Intro to Command Line Flashcards
Difference between /home/ubuntu and home/ubuntu
/home/ubuntu This path specifies a folder called “ubuntu” that lives under your root directory, then home directory.
home/ubuntu This path specifies a completely different folder. This path means there’s a folder called “ubuntu” that lives in a directory called “home”, which is itself in the current directory.
difference between ls and ls/
ls just shows list of current directory. ls/ shows list of root directory
Display contents of a file in an interactive way
less
Display documentation about a command
man
Display last part of a file
tail
How do display contents of a file?
cat
How do you create a file in the CLI?
touch
How to copy a file in CLI
cp
How to Display contents of a file, starting at the top and letting the user scroll down?
more
How to display first part of a file
head
How would you list any files or folders that end in ‘ot’?
ls /*ot
What does the ~ symbol mean?
~ - Your “home” directory, or the directory you are placed in when you log in.
What makes an executable different from other files?
3 reasons
- They have special characters at the beginning to tell the computer how to execute them.
- They have scripts or machine language as their content.
- They have the executable permission
How to list hidden files (dotfiles) in the current directory?
ls -a ~
What’s the difference between abc/ and /abc?
The path abc/ (also ./abc and ./abc/) are paths relative to your current working directory. The path /abc, however, is the file or directory abc in the root directory.