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.
- For example, to find out how to use
man
, typeman man
passwd
: modify a user's passwordls
: list directory contentcd
: change directorypwd
: return working directory namewc
: word, line, character, and byte counthead
: display first lines of a filetail
: display the last part of a filecat
: concatenate and print the filemore
: display output one screen at a timecp
: cope filecp <SOURCE> <DESTINATION>
mv
: move filemv <SOURCE> <DESTINATION>
rm
: remove file (like delete)rm -r
: remove directory (orrmdir
)
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)- -p: 保留原始檔案權限&修改日期等
- -r: 複製整個資料夾
2>&1
: send STDERR to STDOUT (0:STDIN, 1:STDOUT, 2:STDERR)&
: running job in backgroundnohup
: 系統背景執行(不同於&)nohup <COMMAND> &
free -g
: 查看實際剩餘ramgrep
: find keywords in filegrep <KEYWORD> <FILENAME>
tutorials/linux_essential_commands.1330659975.txt.gz · Last modified: by wanchia