Ch.3 Exploring the System Flashcards
What does the command file do?
Determine file type
What does the command less do?
View file contents
How do you specify the directory to list?
ls /usr
if ls is commanded what does it list?
The contents of the current directory
How do you list multiple directories at once?
ls /usr ~ /usr/bin
How do you change the list command output to the long format?
ls -l
What do commands kind of look like?
Command -options arguments
What do most commands use?
options with consist of a single character preceded by a dash. i.e. -l
What are GNU Project options called and how do they look?
They are called long options, and they consist of a word preceded by two dashes
What option will list all files, even those with names that begin with a period, which are normally not listed (That is, hidden)?
-a, –all
What lists everything but the . and ..?
-A, –almost-all
Use this option in conjunction with the -l option to see details about the directory rather than its contents
-d, -directory
This option will append an indicator character to the end of each listed name.
-F, –classify
In long format listings, display file size in human readable format rather than in bytes
-h, –human–readable
Display the results in reverse order. Normally, ls displays its results in ascending alphabetical order.
-r, –reverse
sort by modification time
-t
What seven things are contained in the ls Long Listing Fields?
- Access rights to the file
- File’s number of hard links 3. username of the file’s owner 4. name of the group that owns the file 5. size of the file in bytes 6. Date and Time of the file’s last modification 7. Name of the file
What does ASCII stand for and what is it?
(AS-KEY) American Standard Code for Information Interchange. It is a simple encoding scheme first used on teletype machines to may keyboard characters to numbers.
Why would we want to examine text files
Many of the files that contain system settings are stored in this format, and being able to read them gives us insight about how the system works.
How is the less command used?
less filename
i.e. less /etc/passwd
less action to scroll back one page
Page Up or b
less action to scroll forward one page
Page Down or space