发布于 2015-05-17 08:56:13 | 300 次阅读 | 评论: 0 | 来源: PHPERZ

这里有新鲜出炉的Linux常用命令,程序狗速度看过来!

Linux

Linux是一套免费使用和自由传播的类Unix操作系统,是一个基于POSIX和UNIX的多用户、多任务、支持多线程和多CPU的操作系统。它能运行主要的UNIX工具软件、应用程序和网络协议。


1、du -sh 查看当前文件夹大小

du -sh * | sort -n 统计当前文件夹(目录)大小,并按文件大小排序
du -sk filename 查看指定文件大小


2、 Linux:ls以K、M、G为单位查看文件大小

#ls -lhs

举例比较:

# ls
cuss.war nohup.out

# ls -l
total 30372
-rw-r--r-- 1 root root 31051909 May 24 10:07 cuss.war
-rw------- 1 root root 0 Mar 20 13:52 nohup.out

# ls -lh
total 30M
-rw-r--r-- 1 root root 30M May 24 10:07 cuss.war
-rw------- 1 root root 0 Mar 20 13:52 nohup.out

# ll -h
total 30M
-rw-r--r-- 1 root root 30M May 24 10:07 cuss.war
-rw------- 1 root root 0 Mar 20 13:52 nohup.out

# ls -lhs
总计 28G
15G -rw-r--r-- 1 root root 15G 06-04 14:35 all.txt
8.0K -rwx--x--x 1 root root 632 06-04 15:57 hash.pl



最新网友评论  共有(0)条评论 发布评论 返回顶部

Copyright © 2007-2017 PHPERZ.COM All Rights Reserved   冀ICP备14009818号  版权声明  广告服务