新网创想网站建设,新征程启航

为企业提供网站建设、域名注册、服务器等服务

SomeUnixCommandUsed-创新互联

ls

成都创新互联公司服务项目包括隆德网站建设、隆德网站制作、隆德网页制作以及隆德网络营销策划等。多年来,我们专注于互联网行业,利用自身积累的技术优势、行业经验、深度合作伙伴关系等,向广大中小型企业、政府机构等提供互联网行业的解决方案,隆德网站推广取得了明显的社会效益与经济效益。目前,我们服务的客户以成都为中心已经辐射到隆德省份的部分城市,未来相信会继续扩大服务区域并继续获得客户的支持与信任!

list directory contents
$ ls
64320131230-REPORTID.log          64320140106-REPORTID.log          ORP643ICL1021D2014-01-09-10-46-32.txt
64320131230.log              64320140106.log              ORP643ICL1030D2014-01-09-10-46-36.txt
64320131231-REPORTID.log          64320140107-REPORTID.log          ORPToOnDemand1.sh
64320131231.log              64320140107.log              backup
64320140101-REPORTID.log          64320140108-REPORTID.log          logs
64320140101.log              64320140108.log              ndm_binary_send.ksh
64320140102-REPORTID.log          643_app.cfg                rep_bundle.cfg
64320140102.log              ARUCDBFT1U.20140108.192315.ORP.078.UNX   scripts
64320140103-REPORTID.log          ARUODRECORPU.20140108.192315.ORP.078.REC
64320140103.log              FileSeqNumberFile643

ls -l

use a long listing format
$ ls -l
total 81820
-rw-r--r--   1 udwhapp1 udwhapp     180 Dec 30 18:23 64320131230-REPORTID.log
-rw-r--r--   1 udwhapp1 udwhapp     360 Dec 30 18:23 64320131230.log
-rw-r--r--   1 udwhapp1 udwhapp     1230 Dec 31 18:32 64320131231-REPORTID.log
-rw-r--r--   1 udwhapp1 udwhapp     360 Dec 31 18:32 64320131231.log
-rw-r--r--   1 udwhapp1 udwhapp     945 Jan 01 12:42 64320140101-REPORTID.log
-rw-r--r--   1 udwhapp1 udwhapp      90 Jan 01 12:42 64320140101.log
-rw-r--r--   1 udwhapp1 udwhapp     690 Jan 02 15:49 64320140102-REPORTID.log
-rw-r--r--   1 udwhapp1 udwhapp     180 Jan 02 15:49 64320140102.log
-rw-r--r--   1 udwhapp1 udwhapp     2722 Jan 03 22:11 64320140103-REPORTID.log
-rw-r--r--   1 udwhapp1 udwhapp     720 Jan 03 22:11 64320140103.log
-rw-r--r--   1 udwhapp1 udwhapp    22335 Jan 06 18:33 64320140106-REPORTID.log
-rw-r--r--   1 udwhapp1 udwhapp     270 Jan 06 18:33 64320140106.log
-rw-r--r--   1 udwhapp1 udwhapp    11370 Jan 07 21:34 64320140107-REPORTID.log
-rw-r--r--   1 udwhapp1 udwhapp     540 Jan 07 21:34 64320140107.log
-rw-r--r--   1 udwhapp1 udwhapp    13260 Jan 08 19:23 64320140108-REPORTID.log
-rw-r--r--   1 udwhapp1 udwhapp     720 Jan 08 19:23 64320140108.log
-rwxr-xr-x   1 udwhapp1 udwhapp      69 Nov 29 10:47 643_app.cfg
-rw-r--r--   1 udwhapp1 udwhapp   1943579 Jan 08 19:23 ARUCDBFT1U.20140108.192315.ORP.078.UNX
-rw-r--r--   1 udwhapp1 udwhapp     225 Jan 08 19:23 ARUODRECORPU.20140108.192315.ORP.078.REC
-rw-r--r--   1 udwhapp1 udwhapp      13 Jan 08 19:23 FileSeqNumberFile643
-rw-r--r--   1 udwhapp1 udwhapp     711 Jan 09 10:50 ORP643ICL1021D2014-01-09-10-46-32.txt
-rw-r--r--   1 udwhapp1 udwhapp   39731385 Jan 09 11:02 ORP643ICL1030D2014-01-09-10-46-36.txt
-rwxr-xr-x   1 udwhapp1 udwhapp    51683 Nov 29 10:46 ORPToOnDemand1.sh
drwxrwxr-x   2 udwhapp1 udwhapp    65536 Jan 08 19:23 backup
drwxrwxr-x   2 udwhapp1 udwhapp     2048 Dec 10 11:41 logs
-rwxr-xr-x   1 udwhapp1 udwhapp     330 Nov 29 10:45 ndm_binary_send.ksh
-rwxr-xr-x   1 udwhapp1 udwhapp      3 Nov 29 10:45 rep_bundle.cfg
drwxrwxr-x   2 udwhapp1 udwhapp     2048 Dec 10 11:41 scripts

ls -r  

reverse order while sorting
$ ls -lr
total 81820
drwxrwxr-x   2 udwhapp1 udwhapp     2048 Dec 10 11:41 scripts
-rwxr-xr-x   1 udwhapp1 udwhapp      3 Nov 29 10:45 rep_bundle.cfg
-rwxr-xr-x   1 udwhapp1 udwhapp     330 Nov 29 10:45 ndm_binary_send.ksh
drwxrwxr-x   2 udwhapp1 udwhapp     2048 Dec 10 11:41 logs
drwxrwxr-x   2 udwhapp1 udwhapp    65536 Jan 08 19:23 backup
-rwxr-xr-x   1 udwhapp1 udwhapp    51683 Nov 29 10:46 ORPToOnDemand1.sh
-rw-r--r--   1 udwhapp1 udwhapp   39731385 Jan 09 11:02 ORP643ICL1030D2014-01-09-10-46-36.txt
-rw-r--r--   1 udwhapp1 udwhapp     711 Jan 09 10:50 ORP643ICL1021D2014-01-09-10-46-32.txt
-rw-r--r--   1 udwhapp1 udwhapp      13 Jan 08 19:23 FileSeqNumberFile643
-rw-r--r--   1 udwhapp1 udwhapp     225 Jan 08 19:23 ARUODRECORPU.20140108.192315.ORP.078.REC
-rw-r--r--   1 udwhapp1 udwhapp   1943579 Jan 08 19:23 ARUCDBFT1U.20140108.192315.ORP.078.UNX
-rwxr-xr-x   1 udwhapp1 udwhapp      69 Nov 29 10:47 643_app.cfg
-rw-r--r--   1 udwhapp1 udwhapp     720 Jan 08 19:23 64320140108.log
-rw-r--r--   1 udwhapp1 udwhapp    13260 Jan 08 19:23 64320140108-REPORTID.log
-rw-r--r--   1 udwhapp1 udwhapp     540 Jan 07 21:34 64320140107.log
-rw-r--r--   1 udwhapp1 udwhapp    11370 Jan 07 21:34 64320140107-REPORTID.log
-rw-r--r--   1 udwhapp1 udwhapp     270 Jan 06 18:33 64320140106.log
-rw-r--r--   1 udwhapp1 udwhapp    22335 Jan 06 18:33 64320140106-REPORTID.log
-rw-r--r--   1 udwhapp1 udwhapp     720 Jan 03 22:11 64320140103.log
-rw-r--r--   1 udwhapp1 udwhapp     2722 Jan 03 22:11 64320140103-REPORTID.log
-rw-r--r--   1 udwhapp1 udwhapp     180 Jan 02 15:49 64320140102.log
-rw-r--r--   1 udwhapp1 udwhapp     690 Jan 02 15:49 64320140102-REPORTID.log
-rw-r--r--   1 udwhapp1 udwhapp      90 Jan 01 12:42 64320140101.log
-rw-r--r--   1 udwhapp1 udwhapp     945 Jan 01 12:42 64320140101-REPORTID.log
-rw-r--r--   1 udwhapp1 udwhapp     360 Dec 31 18:32 64320131231.log
-rw-r--r--   1 udwhapp1 udwhapp     1230 Dec 31 18:32 64320131231-REPORTID.log
-rw-r--r--   1 udwhapp1 udwhapp     360 Dec 30 18:23 64320131230.log
-rw-r--r--   1 udwhapp1 udwhapp     180 Dec 30 18:23 64320131230-REPORTID.log

ls -t

sort by modification time
$ ls -lrt
total 81820
-rwxr-xr-x   1 udwhapp1 udwhapp     330 Nov 29 10:45 ndm_binary_send.ksh
-rwxr-xr-x   1 udwhapp1 udwhapp      3 Nov 29 10:45 rep_bundle.cfg
-rwxr-xr-x   1 udwhapp1 udwhapp    51683 Nov 29 10:46 ORPToOnDemand1.sh
-rwxr-xr-x   1 udwhapp1 udwhapp      69 Nov 29 10:47 643_app.cfg
drwxrwxr-x   2 udwhapp1 udwhapp     2048 Dec 10 11:41 scripts
drwxrwxr-x   2 udwhapp1 udwhapp     2048 Dec 10 11:41 logs
-rw-r--r--   1 udwhapp1 udwhapp     180 Dec 30 18:23 64320131230-REPORTID.log
-rw-r--r--   1 udwhapp1 udwhapp     360 Dec 30 18:23 64320131230.log
-rw-r--r--   1 udwhapp1 udwhapp     360 Dec 31 18:32 64320131231.log
-rw-r--r--   1 udwhapp1 udwhapp     1230 Dec 31 18:32 64320131231-REPORTID.log
-rw-r--r--   1 udwhapp1 udwhapp      90 Jan 01 12:42 64320140101.log
-rw-r--r--   1 udwhapp1 udwhapp     945 Jan 01 12:42 64320140101-REPORTID.log
-rw-r--r--   1 udwhapp1 udwhapp     180 Jan 02 15:49 64320140102.log
-rw-r--r--   1 udwhapp1 udwhapp     690 Jan 02 15:49 64320140102-REPORTID.log
-rw-r--r--   1 udwhapp1 udwhapp     2722 Jan 03 22:11 64320140103-REPORTID.log
-rw-r--r--   1 udwhapp1 udwhapp     720 Jan 03 22:11 64320140103.log
-rw-r--r--   1 udwhapp1 udwhapp     270 Jan 06 18:33 64320140106.log
-rw-r--r--   1 udwhapp1 udwhapp    22335 Jan 06 18:33 64320140106-REPORTID.log
-rw-r--r--   1 udwhapp1 udwhapp    11370 Jan 07 21:34 64320140107-REPORTID.log
-rw-r--r--   1 udwhapp1 udwhapp     540 Jan 07 21:34 64320140107.log
drwxrwxr-x   2 udwhapp1 udwhapp    65536 Jan 08 19:23 backup
-rw-r--r--   1 udwhapp1 udwhapp      13 Jan 08 19:23 FileSeqNumberFile643
-rw-r--r--   1 udwhapp1 udwhapp   1943579 Jan 08 19:23 ARUCDBFT1U.20140108.192315.ORP.078.UNX
-rw-r--r--   1 udwhapp1 udwhapp    13260 Jan 08 19:23 64320140108-REPORTID.log
-rw-r--r--   1 udwhapp1 udwhapp     225 Jan 08 19:23 ARUODRECORPU.20140108.192315.ORP.078.REC
-rw-r--r--   1 udwhapp1 udwhapp     720 Jan 08 19:23 64320140108.log
-rw-r--r--   1 udwhapp1 udwhapp     711 Jan 09 10:50 ORP643ICL1021D2014-01-09-10-46-32.txt
-rw-r--r--   1 udwhapp1 udwhapp   39731385 Jan 09 11:02 ORP643ICL1030D2014-01-09-10-46-36.txt

uname -a

get the unix version

$ uname -a
AIX rdcgcgboxaa01u 1 6 00F621BB4C00

id

get current user id and group id

$ id
uid=14042(udwhapp1) gid=14042(udwhapp)

grep
Searches for a pattern in a file.

$ grep 'REPORT DATE  :  12/31/2013' *txt
ORP643ICL1049D2014-01-09-16-23-06.txt: REPORT DATE  :  12/31/2013
ORP643ICL1051D2014-01-09-16-23-07.txt: REPORT DATE  :  12/31/2013
ORP643ICL1056D2014-01-09-15-52-12.txt: REPORT DATE  :  12/31/2013
ORP643ICL1070D2014-01-09-16-23-02.txt: REPORT DATE  :  12/31/2013
ORP643LCL1071D2014-01-09-16-23-05.txt: REPORT DATE  :  12/31/2013
ORP643LNE1174D2014-01-09-14-56-21.txt: REPORT DATE  :  12/31/2013
ORP643LNE1182W2014-01-09-14-58-44.txt: REPORT DATE  :  12/31/2013

grep ...|wc -l

Returns the search result count

wc -l

Counts the number of lines

$ grep 'REPORT DATE  :  12/31/2013' *txt |wc -l
   96

head

Displays the first few lines of a file.

line

Reads one line from the standard input. Can be used to avoid account timeout logoff.

ls –lrt|tail -10

Displays the last 10 files of current directory.

tail

Displays the last few lines of a file.

另外有需要云服务器可以了解下创新互联cdcxhl.cn,海内外云服务器15元起步,三天无理由+7*72小时售后在线,公司持有idc许可证,提供“云服务器、裸金属服务器、高防服务器、香港服务器、美国服务器、虚拟主机、免备案服务器”等云主机租用服务以及企业上云的综合解决方案,具有“安全稳定、简单易用、服务可用性高、性价比高”等特点与优势,专为企业上云打造定制,能够满足用户丰富、多元化的应用场景需求。


当前标题:SomeUnixCommandUsed-创新互联
当前网址:http://www.wjwzjz.com/article/dcscci.html
在线咨询
服务热线
服务热线:028-86922220
TOP