Linux Chapter 1 Flashcards
$ vs # on bash
means root
Command quiz : df
Current amount of free space on our disk drive
Command quiz : free
Current amount of free memory
Command quiz : pwd
Print Working Directory
Do file extensions matter on Linux?
Nope. Contents and purpose of files are determined through other means.
Command quiz: cd with no arguments
Changes the working directory to your home directory.
Command quiz: cd ~user_name
Changes the working directory to the home directory of user_name. For example, typing cd ~bob will change the directory to the home directory of user “bob.
List contents of multiple directories
ls ~ /etc
Command quiz: ls -l
List files, but with more details (long)
What is the general format of commands?
command -option arguments.
Multiple options can be strung together. There are “long options” as well, which are options preceded by two dashes instead of one. Some short options have a long option version. For example, “ls -a” is the same as ls “–all”.
Command quiz: ls -dl
Ordinarily, if a directory is specified, ls will list the contents of the directory, not the directory itself. Use this option in conjunction with the -l option to see details about the directory rather than its contents.
Command quiz: ls -F
This option will append an indicator character to the end of each listed name. For example, it will append a forward slash (/) if the name is a directory.
Command quiz: ls -hl
In long format listings, display file sizes in human-readable format rather than in bytes.
Command quiz: ls -S
Sort results by file size.
Command quiz: ls -t
Sort by modification time.