NDOS515_Session_2 Flashcards
“Desktop”…?
Shows up on your GUI desktop
“Documents”…?
for…documents.
“Bin”…?
holds “binaries” and executable scripts
“public_html”…?
(sometimes) has your Web page(s)
“pwd”…?
tells where you are
“cd”…?
to get to a new directory (folder)
”~”…?
refers to your home
- cd ~
- cd ~/music
Leading slash (or ~) means …?
Start at top.
Absence of slash means…?
From here.
Linux Standard Directories:
/bin…?
Important executables.
Linux Standard Directories:
/etc…?
System configuration.
Linux Standard Directories:
/home…?
Users homes
Linux Standard Directories:
/tmp…?
Temporary Files.
Linux Standard Directories:
/user/bin…?
More executables.
Redirection:
The output of any command can be captured into a file…?
ls > listing.txt
note: “.txt” isn’t necessary and is omitted by experienced Unix users
Adding to a file…?
ls/bin»_space; listing.txt
Viewing files:
Short files can be viewed with…?
cat.
cat listing.txt
Viewing files:
For longer ones, use…?
Less
(less bigfile)
(type space to see more, q to quit, h for help)
Viewing files:
Use file to find out what something is…?
file /etc/passwd
Copy, rename/move, delete…?
- cp coolstuff coolstuff.bak
- mv coolstuff.bak backup
- mv backup my-backups/coolstuff.bak
- rm my-backups/coolstuff.bak
Unix (and Linux) is design on the assumption that you don’t like…?
Chatty computers.
Success in Linux is generally indicated by…?
Silence:
(rm backup
rm backup2
rm: cannot remove ‘backup2’: No such file or directory)
Directory Management:
For historical reasons, directories are handled differently:
- mkdir backups
- rmdir obsolete
- cp -r public_html backups/web-backup
- rm -r backups
(WARNING rm -r is extremely dangerous. Never type Enter until you’ve triple-checked what you typed!)
Globbing:
It’s a pain to type lots of file names, so you can…?
abbreviate. - ls a* - less *.txt (omits files starting with dot... why) - ls .??* More choices, but these are common ones.