小命令:stat,file,killall,df,du

stat:查看系统上某个文件的所有状态信息:

[oh@localhost manlist]$ stat ls.md 
  File: `ls.md'
  Size: 7579      	Blocks: 16         IO Block: 4096   regular file
Device: 803h/2051d	Inode: 6691574     Links: 1
Access: (0664/-rw-rw-r--)  Uid: (  500/      oh)   Gid: (  500/      oh)
Access: 2018-03-15 16:36:50.460265066 +0800
Modify: 2018-03-15 16:36:31.946041769 +0800
Change: 2018-03-15 16:36:31.946041769 +0800
[oh@localhost manlist]$ 

===

查看文件类型:file

[oh@localhost manlist]$ file git.md 
git.md: UTF-8 Unicode English text
[oh@localhost manlist]$ 


killall命令:

#killall http*

杀死所有义http开头的进程

=====

df查看某个设备还有多少磁盘空间:

[oh@localhost manlist]$ df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda3       122G  5.8G  110G   5% /
tmpfs           929M   32M  897M   4% /dev/shm
[oh@localhost manlist]$ df
Filesystem     1K-blocks    Used Available Use% Mounted on
/dev/sda3      127658732 5977420 115189920   5% /
tmpfs             950572   32216    918356   4% /dev/shm
[oh@localhost manlist]$ 

du:某个目录下所有文件或指定文件大小

[oh@localhost manlist]$ du -h ls.md 
8.0K	ls.md
[oh@localhost manlist]$ 

=====

排序数据:sort,按默认语言规则排序。

SORT(1)                          User Commands                         SORT(1)

NAME
       sort - sort lines of text files

SYNOPSIS
       sort [OPTION]... [FILE]...
       sort [OPTION]... --files0-from=F

DESCRIPTION
       Write sorted concatenation of all FILE(s) to standard output.

       Mandatory arguments to long options are mandatory for short options too.  Ordering options:

       -b, --ignore-leading-blanks
              ignore leading blanks

       -d, --dictionary-order
              consider only blanks and alphanumeric characters

       -f, --ignore-case
              fold lower case to upper case characters

       -g, --general-numeric-sort
              compare according to general numerical value


















你可能感兴趣的:(linux)