我想知道磁盘是固态驱动器还是硬盘。
lshw未安装。我做了yum install lshw,它说没有名为 lshw 的包。我不知道哪个版本的http://pkgs.repoforge.org/lshw/适合我的 CentOS。
我在网上搜索,没有任何内容可以解释如何知道驱动器是 SSD 还是 HDD。我应该先格式化它们吗?
结果fdisk -l:
Disk /dev/sda: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00074f7d
Device Boot Start End Blocks Id System
/dev/sda1 * 1 14 103424 83 Linux
Partition 1 does not end …Run Code Online (Sandbox Code Playgroud) sh sys-snap.sh &
Run Code Online (Sandbox Code Playgroud)
什么是sh?什么是sys-snap.sh?为什么我应该放在&行尾?谁能解释一下语法?
如果没有&脚本,在我按下Ctrl+之前,脚本不会返回到提示C。随着&我可以按回车,它的工作原理。
我只是格式化的东西。一张磁盘我格式化为 ext2。另一个我想格式化为ext4。我想测试他们的表现。
现在,我如何知道分区中的文件系统类型?
root@host [/home2]# lsof /home2
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
php 3182 ctxmortg cwd DIR 8,17 4096 32858196 /home2/ctxmortg/public_html/hello
php 3182 ctxmortg 3r REG 8,17 46404 55781766 /home2/ctxmortg/public_html/hello/cache/subprimemortgagemorgage.com/cache-zch-8284-cache.txt
php 3185 ctxmortg cwd DIR 8,17 4096 32858196 /home2/ctxmortg/public_html/hello
php 3185 ctxmortg 3r REG 8,17 4185 35962154 /home2/ctxmortg/public_html/hello/cache/curl/http%3A%2F%2Fimage.yahoo.cn%2Fs%3Fq%3DNudity%26c%3D0%26s%3D%26page%3D277
php 3187 ctxmortg cwd DIR 8,17 4096 32858196 /home2/ctxmortg/public_html/hello
php 3187 ctxmortg 3r REG 8,17 54640 69699731 /home2/ctxmortg/public_html/hello/cache/newdatingfriends.com/cache-zch-1545-cache.txt
php 3188 ctxmortg cwd DIR 8,17 4096 32858196 /home2/ctxmortg/public_html/hello
php 3188 ctxmortg 3r …Run Code Online (Sandbox Code Playgroud) 我从以下输出top:
Cpu(s): 43.8%us, 32.5%sy, 4.8%ni, 2.0%id, 15.6%wa, 0.2%hi, 1.2%si, 0.0%st
Mem: 16331504k total, 15759412k used, 572092k free, 4575980k buffers
Swap: 4194296k total, 260644k used, 3933652k free, 1588044k cached
Run Code Online (Sandbox Code Playgroud)
的输出iostat -xk 6显示如下:
Device: rrqm/s wrqm/s r/s w/s rkB/s wkB/s avgrq-sz avgqu-sz await svctm %util
sda 0.00 360.20 86.20 153.40 1133.60 2054.40 26.61 1.51 6.27 0.77 18.38
sdb 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
sdd 22.60 198.80 17.40 31.60 265.60 921.60 48.46 0.18 …Run Code Online (Sandbox Code Playgroud) 说我有一个目录/hello。
那我做mv /hello /hello2。
我搬进/hello去了/hello2/hello吗?还是我移动/hello到/hello2?
似乎当我做这样的事情时,我得到的结果不一致。
在 Linux 中。假设我想运行一个命令,它花费的时间太长。我只是想确保它完成了。如何?
avg-cpu: %user %nice %system %iowait %steal %idle
11.50 0.02 5.38 0.07 0.00 83.04
Device: rrqm/s wrqm/s r/s w/s rkB/s wkB/s avgrq-sz avgqu-sz await svctm %util
sdc 0.01 89.92 0.26 41.59 3.36 457.19 22.01 0.23 5.60 0.09 0.38
sdb 0.10 15.59 0.40 14.55 8.96 120.57 17.33 0.04 2.91 0.07 0.11
sda 0.13 45.37 0.96 8.09 20.06 213.56 51.63 0.02 2.64 0.16 0.14
sde 0.01 31.83 0.09 11.34 0.94 103.56 18.29 0.04 3.52 0.14 0.16
sdd 0.01 48.01 0.13 19.81 1.58 202.16 …Run Code Online (Sandbox Code Playgroud) 这是/home3我系统上目录的内容:
./ backup/ hearsttr@ lost+found/ randomvi@ sexsmovi@
../ freemark@ investgr@ nudenude@ romanced@ wallpape@
Run Code Online (Sandbox Code Playgroud)
我想清理它,但我担心符号链接指向另一个驱动器。
如果我说它rm -rf /home3会删除另一个驱动器吗?