Exploring The System Flashcards
How do you list the content of a directroy?
ls
How do you determine a file type?
file filename
How can you veiw the contents of a file?
less
How do we change the format of a commands output?
We change the format of a command output by using Options and Arguments.
How do list the content of multiple directories?
ls ~ /usr /var Issue a ls to tell the system to list the content of each directory listed seperated by a space
What does ls -a (–all) do?
List all files, even those that begin with a period, which are normally hidden
What does ls - l do?
Displays results in long form
What does ls - d (–directory) do?
When used in conjunction with -l it will list the details of the direcotry rather than its contents
What does ls -h (human-readable) do?
In long form listing, displays the file size in human readable format rather than bytes.
What does ls -F (–classify) do?
This option appends an indicator character to the end of each listed name.
What does ls -r (–reverse) do?
Displays results in reverse order.
What does ls -s do?
Sorts by file size.
What does ls -t do?
Sorts by modification time.
What is a common ls command with options
ls -ltr This will show the contents of a directory in long format sorted by time then display in reverse order.
What are some of the common ways to navigate less
“Page up or b Scroll back one page”
“Page Down or space Scroll forward one page”
“Up Arrow” Scroll up one line”
How can we view the contents of a text file?
less
/
The root directory. Where everything begins.
/bin
Contains binaries (programs) that must be present for the system to boot and run.
/boot
Contains the Linux kernel, initial RAM disk image (for drivers needed at boot time), and the boot loader.
/boot/grub/grub.conf or menu.lst
used to configure the boot loader
/boot/vmlinuz
the linux kernel
/etc
The /etc directory contains all of the system-wide configuration files. It also contains a collection of shell scripts which start each of the system services at boot time. Everything in the directory should be readable text.
/etc/crontab
A file that defines when automated jobs will run
/dev
This is a special directory which contains device nodes. “Everything is a file” also applies to devices. Here is where the kernel maintains a list of all the devices it understands.