Shared Flashcard Set

Details

Linux Server Commands
Linux Server Commands
32
Computer Science
Undergraduate 1
09/23/2009

Additional Computer Science Flashcards

 


 

Cards

Term
cd ~
Definition
go to your home directory
Term
cd -
Definition
go to the last directory you were in
Term
cd ..
Definition
go up a directory cat : print file contents to the screen
Term
cd
Definition
change directory
Term
ls -al
Definition
shows all files (including ones that start with a period), directories, and details attributes for each file.
Term
chmod
Definition
0 = --- No permission
1 = --X Execute only
2 = -W- Write only
3 = -WX Write and execute
4 = R-- Read only
5 = R-X Read and execute
6 = RW- Read and write
7 = RWX Read, write and execute

USER - GROUP - EVERONE
Term
chmod 000
Definition
No one can access
Term
chmod 644
Definition
Usually for HTML pages
Term
chmod 755
Definition
Usually for CGI scripts
Term
chown:
Definition
changes file ownership permissions
The set of 2 go in this order from left to right:
USER - GROUP
Term
chown root myfile.txt :
Definition
Changes the owner of the file to root
Term
chown root.root myfile.txt :
Definition
Changes the owner and group of the file to root
Term
tail :
Definition
like cat, but only reads the end of the file
Term
tail /var/log/messages
Definition
see the last 20 (by default) lines of /var/log/messages
Term
tail -f /var/log/messages
Definition
watch the file continuously, while it's being updated
Term
tail -200 /var/log/messages
Definition
print the last 200 lines of the file to the screen
Term
more
Definition
like cat, but opens the file one screen at a time rather than all at once
Term
more /etc/userdomains
Definition
browse through the userdomains file. hit Spaceto go to the next page, q to quit
Term
pico
Definition
friendly, easy to use file editor
Term
pico /home/burst/public_html/index.html
Definition
edit the index page for the user's website.
Term
vi :
Definition
another editor, tons of features, harder to use at first than pico
Term
vi /home/burst/public_html/index.html
Definition
edit the index page for the user's website.
Whie in the vi program you can use the following useful commands, you will need to hit SHIFT + : to go into command mode
Term
:q!
Definition
This force quits the file without saving and exits vi
Term
:w
Definition
This writes the file to disk, saves it
Term
:wq
Definition
This saves the file to disk and exists vi
Term
:LINENUMBER
Definition
EG :25 : Takes you to line 25 within the file
Supporting users have an ad free experience!