list(list)
list-a: List things in long listing fashion
ls-a: List things including "hidden" files (就是以"."开头的,都是Hidden的文件。)
lsblk print block devices by their assigned name (but not RAM)
md5sum (Compute and Check MD5 Message Digest)
dd: Command “dd” stands for (Convert and Copy a file), Can be used to convert and copy a file and most of the times is used to copy an iso file (or any other file) to a USB device (or any other location), thus can be used to make a ‘Bootlable‘ USB Stick.
uname(unix name),check all machine info.
history stands for History (Event) Record, it prints the history of long list of executed commands in terminal.查看历史所有运行的记录,sudo xxx/ sudo xxx/...
sudo(super user do)
mkdir making directory
touch:(Update the access and modification times of each FILE to the current time). touch command creates the file, only if it doesn’t exist. If the file already exists it will update the timestamp and not the contents of the file.(如果文件不存在,则创建文件,否则update the timestamp)
chmod stands for (change file mode bits). chmod changes the file mode (permission) of each given file, folder, script, etc.. according to mode asked for.
Read (r)=4 Write(w)=2 Execute(x)=1
rwxr-x--x abc.sh
Here the root’s permission is rwx (read, write and execute).
usergroup to which it belongs, is r-x (read and execute only, no write permission) and for world is –x (only execute).
root@tecmint:~# chmod 777 abc.sh (provide read, write and execute permission to owner, group, and world.)
root@tecmint:~# chmod 666 abc.sh (only read and write permission to all three.)
root@tecmint:~# chmod 711 abc.sh(read, write and execute to owner and only execute to group and world.)
chown: (change file owner and group). Every file belongs to a group of user and a owner. 在用ls-l的时候可以看到它的file owner /group,然后你可以更改成你想要的woner,或者group:
owner and group.png
change the group.png
apt: stands for (Advanced Package Tool). Apt is an advanced package manager for Debian based system (Ubuntu, Kubuntu, etc.)
tar压缩,解压缩,都是这个。 可以参考:这个链接
创建压缩文件 tar -cvf tecmint-14-09-12.tar /home/tecmint/
创建tar.gz文件 # tar cvzf MyImages-14-09-12.tar.gz /home/MyImages 或者 tar cvzf MyImages-14-09-12.tgz /home/MyImages
解压
解压到当前文件: # tar -xvf public_html-14-09-12.tar
解压到指定文件:# tar -xvf public_html-14-09-12.tar -C /home/public_html/videos/
列出所有文件:# tar -tvf uploadprogress.tar
解压指定文件:# tar -xvf cleanfiles.sh.tar cleanfiles.sh或者tar --extract --file=cleanfiles.sh.tar cleanfiles.sh
cal “cal” (Calendar), it is used to displays calendar of the present month or any other month of any year that is advancing or passed. eg: cal 02 1935 就是打印1935年2月的calendar.
date打印日期,更改日期date --set='14 may 2013 13:57'
cat合并文件 “cat” stands for (Concatenation). Concatenate (join) two or more plain file and/or print contents of a file on standard output.
创建文件:cat > file1然后输入你想要输入的内容,结束之后,按下ctrl+D,回到命令行,然后文件就创建成功了。
浏览文件,你同样可以用cat file1
合并文件,然后命名为新的文件 cat file1 file2 > newfile
cp copy文件cp /home/user/Downloads abc.tar.gz /home/user/Desktop (Return 0 when sucess)