Linux Shell Cheat Sheet

1. 查看Linux操作系统信息:

uname -a

cat /proc/version

lsb_release -a

2. 设置ls显示的文件夹的颜色(将下面这条目录加在 .bashrc 文件最后):

LS_COLORS=$LS_COLORS:'di=0;35:' ; export LS_COLORS

(All possible colors:
31  = red
32  = green
33  = orange
34  = blue
35  = purple
36  = cyan
37  = grey
90  = dark grey
91  = light red
92  = light green
93  = yellow
94  = light blue
95  = light purple
96  = turquoise

97  = white)

3. 在远程服务器X Server上显示图形界面

ssh -x uname@ip

4. 强制转换图像大小

convert -resize 1056x640! 000456.jpg 000456_640_1056.jpg

5. 查看图像信息

file 000456_640_1056.jpg

identify 000456_640_1056.jpg

6. 查看物理CPU的个数

cat /proc/cpuinfo |grep "physical id"|sort |uniq|wc -l 

7. 查看逻辑CPU的个数

cat /proc/cpuinfo |grep "processor"|wc -l 

8. 查看一个物理CPU是几核

cat /proc/cpuinfo |grep "cores"|uniq

9. 查看当前目录大小

du -h --max-depth=1 ./

猜你喜欢

转载自blog.csdn.net/ywcpig/article/details/80167586