[dwapp@dw_testdb ~]$ who dwapp pts/0 Jun 23 20:46 (101.15.16.7) dwapp pts/2 Jun 23 16:38 (101.15.13.6) dwapp pts/6 Jun 22 10:02 (101.15.17.2) dwapp pts/7 Jun 23 17:48 (101.15.16.8) dwapp pts/8 Jun 22 10:16 (101.15.17.3) dwapp pts/9 Jun 23 11:11 (101.15.16.34) root pts/11 Jun 22 10:58 (101.15.16.33) root pts/12 Jun 22 ...
by yuechaotian - Linux文档专区 - 2009-06-24 08:55:20 阅读(710) 回复(0)
切换到第一个文本终端。在Linux下你可以有多达六个不同的终端。这个命令的意思是:“同时按住 键和 键,然后按 键,再释放所有的键”。 (n=1..6) 切换到第一个图形用户界面(一般来说X-window在第七个终端) (在X窗口,KDE下)关闭我鼠标将要指向的窗口(...
一个非常有用的命令,主要用来提取各种各样的数据。 cut -cchars file 如: -c5 提取第5个字符 -c5- 提取第5个字符以后的字符 -c1,5,12 提取多个字符,中间用“,”符号隔开 -c5-14 提取第5个字符到第14个字符间的字符 http://gan.cublog.cn [service@dsg tmp]$ cat f.txt service pts/0 Oct 9 20:27 (211.95.114.235) service pts/1 Oct 9 21:06 (218.80.203.242) serv...
作者: Bebodu 出自: http://www.linuxdiyf.com #cut -d '分隔字符' -f fields 参数 -d: 后面接分隔字符,与-f一起使用 -f: 依据-d的分隔字符将一段信息分割成为数据,用-f取取第几段的意思 -c: 以字符(characters)的单位取出固定字符的区间 cat /etc/passwd | cut -d ':' -f 1 cat /etc/passwd | cut -d ':' -f 6 本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/31/showart_684435.html
用法:cut -cnum1-num2,num3-num4,... -fnum1-num2,num3-num4,... filename 说明:用来显示filename文件中的指定文字 -c 显示每行从开头算num1到num2,num3到num4等的文字(从0开始算起); -f 用来显示第num1到num2,num3到num4等栏的字符(从1开始算起); 下面举例说明: 文件file1中包含内容: linux 23 24 15000 baidu 15 16 1900 #cut -c0-5 file1 linux baidu #cut -c0-5,6-10 file1 linux 23 24 baidu 15 16 ...
使用权限:所有使用者 用法:cut -cnum1-num2 filename 说明:显示每行从开头算起 num1 到 num2 的文字。 范例: shell>> cat example test2 this is test1 shell>> cut -c1-6 example ## print 开头算起前 6 个字元 test2 this i -c m-n 表示显示每一行的第m个字元到第n个字元。例如: ---------file----------- liubi 23 14000 ---------file----------- # cut -c 1-5,10-14 file liubi 14000 -f m-n 表示显示第...
使用权限:所有使用者 用法:cut -cnum1-num2 filename 说明:显示每行从开头算起 num1 到 num2 的文字。 范例: shell>> cat example test2 this is test1 shell>> cut -c1-6 example ## print 开头算起前 6 个字元 test2 this i -c m-n 表示显示每一行的第m个字元到第n个字元。例如: ---------file----------- liubi 23 14000 ---------file----------- # cut -c 1-5,10-14 file liubi 14000 -f m-n 表示显示...
我们经常会遇到需要取出分字段的文件的某些特定字段,例如 /etc/password就是通过":"分隔各个字段的。 可以通过cut命令来实现。例如,我们希望将系统账号名保存到特定的文件,就可以: [root@localhost ~]# cut -d: -f1 /etc/passwd > /tmp/zieckey_usr,txt [root@localhost ~]# cat /tmp/zieckey_usr,txt root bin daemon adm lp sync shutdown halt mail news uucp operator games gopher ftp nobody rpm vcsa apache mailnull ...
作者:zieckey (http://zieckey.cublog.cn) All Rights Reserved! 我们经常会遇到需要取出分字段的文件的某些特定字段,例如 /etc/password就是通过":"分隔各个字段的。 可以通过cut命令来实现。例如,我们希望将系统账号名保存到特定的文件,就可以: [root@localhost ~]# cut -d: -f1 /etc/passwd > /tmp/zieckey_usr,txt [root@localhost ~]# cat /tmp/zieckey_usr,txt root bin daemon adm lp sync shutdown ha...
cut: syntax cut option [files] it is useful if you want to access the vertical slice of a file,by fault,the slices are delimilit by a tab parameter used options -b list print bytes in list options -c list print characters in list columns -d delim set field for -f -f list print list fields example cut -d: f1 /etc/passwd; cut -c 1 /etc/passwd join syn...