tutorials:linux_essential_commands
This is an old revision of the document!
Linux Essential Commands
man: manual page.- Explains how to use a shell command.
man <COMMAND>: For example, to find out how to useman, typeman man
ls: list directory contentcd: change directorypwd: print working directorywc: count word, line, character, and bytehead: display first 10 lines of a filetail: display the last part of a filecat: concatenate and print the filemore: display output one screen at a timecp: copy filecp <SOURCE> <DESTINATION>
mv: move file (can be use as changing file name)mv <SOURCE> <DESTINATION>
rm: remove file (like delete)rm -r: remove directory (likermdir)
chmod: change file modes or Access Control Lists- (u,g,o): user, group, other
- (r,w,x): read, write, execute
chown: change file owner or groupmkdir: make directoriesrmdir: remove directoriesssh: OpenSSH SSH client (remote login program)ssh usrname@ip_adress
scp: secure copy (remote file copy program)scp <SOURCE> USRNAME@IP:<DESTINATION>scp USRNAME@IP:<SOURCE> <DESTINATION>- -p: 保留原始檔案權限&修改日期等, -r: 複製整個資料夾
2>&1: send STDERR to STDOUT (0:STDIN, 1:STDOUT, 2:STDERR)&: running job in background (終端機背景執行)nohup: 系統背景執行(不同於&)nohup <COMMAND> &
free -g: 查看實際剩餘ram(單位為G)grep: find keywords in filegrep <KEYWORD> <FILENAME>
niceandrenice: run a program with modified priority. If the server is under heavy load and you need to start a non-urgent large job, please use these.
tutorials/linux_essential_commands.1331545360.txt.gz · Last modified: by chkuo