Linux知识手册,Linux 常用操作、基本知识参考手册

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:

05f893b0671c

owner and group.png

05f893b0671c

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)

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值