suse linux标准c安装,suse linux安装cmake时ccmake没有安装上的原因
文件內容查閱
cat:由第一行開始顯示文件內容
tac:由最后一行開始顯示文件內容
nl:顯示的時候,順便輸出行號
more:一頁一頁的顯示文件內容
less:與more類似,但是它可以往前翻頁
head:只看頭幾行
tail:只看結尾幾行
touch:文件創建與文件時間修改
cat(concatenate)
語法:cat [-AbEnTv]
選項與參數:
-A:相當于-vET的整合參數
-b:列出行號,僅針對非空白行做行號顯示
-n:輸出行號,空白與非空白都會列出
-E:將結尾的斷行字符¥顯示出來
-v:列出一些看不出的特殊字符
-T:將Tab按鍵以∧I顯示出來
舉例:
[[email?protected] tmp]# cat /etc/issue
CentOS release 5.10 (Final)
Kernel \r on an \m
[[email?protected] tmp]# cat -n /etc/issue
1 CentOS release 5.10 (Final)
2 Kernel \r on an \m
3
[[email?protected] tmp]# cat -A /etc/issue
CentOS release 5.10 (Final)$
Kernel \r on an \m$
$
添加行號與打印(nl)
語法 :[[email?protected] ~]# nl [-bnw] 文件
選項與參數:
-b:指定行號指定的方式,主要有兩種:
-b a :表示不論是否為空行,也同樣列出行號(類似 cat -n);
-b t :如果有空行,空的那一行不要列出行號(默認值);
-n:列出行號表示的方法,主要有三種:
-n ln :行號在螢幕的最左方顯示;
-n rn :行號在自己欄位的最右方顯示,且不加 0 ;
-n rz :行號在自己欄位的最右方顯示,且加 0 ;
-w:行號欄位的占用的位數。
舉例
[[email?protected] ~]# nl /etc/issue
1 CentOS release 5.3 (Final)
2 Kernel \r on an \m
這個文件其實有三行,第三行為空白(沒有任何字節),
因為他是空白行,所以 nl 不會加上行號喔
[[email?protected] ~]# nl -b a /etc/issue
1 CentOS release 5.3 (Final)
2 Kernel \r on an \m
3
[[email?protected] ~]# nl -b a -n rz /etc/issue
000001 CentOS release 5.3 (Final)
000002 Kernel \r on an \m
000003
自動在自己欄位的地方補上 0 了~默認欄位是六位數,如果想要改成 3 位數?
[[email?protected] ~]# nl -b a -n rz -w 3 /etc/issue
001 CentOS release 5.3 (Final)
002 Kernel \r on an \m
003
語法:more|less文件
More:
空白鍵 (space):代表向下翻一頁;
Enter????????:代表向下翻『一行』;
/字串????????:代表在這個顯示的內容當中,向下搜尋『字串』這個關鍵字;
:f???????????:立刻顯示出檔名以及目前顯示的行數;
q????????????:代表立刻離開 more ,不再顯示該文件內容。
b 或 [ctrl]-b :代表往回翻頁,不過這動作只對文件有用,對管線無用。
Less:
空白鍵????:向下翻動一頁;
[pagedown]:向下翻動一頁;
[pageup]??:向上翻動一頁;
/字串?????:向下搜尋『字串』的功能;
?字串?????:向上搜尋『字串』的功能;
n????????:重復前一個搜尋 (與 / 或 ? 有關!)
N????????:反向的重復前一個搜尋 (與 / 或 ? 有關!)
q????????:離開 less 這個程序;
舉例:
[[email?protected] tmp]# more /etc/man.config
#
# Generated automatically from man.conf.in by the
……..
# and to determine the correspondence between extensions and decompressors.
#
# MANBIN /usr/local/bin/man
#
--More--(31%)
取出前面幾行(head)
語法:head [-nnumber] 文件
選項與參數:
-n:后面接數字,代表行數
number默認值是10 當number是負數,代表列出前面所有行數但是不包括后面number行
取出后面幾行(tail)
語法:tail [-nnumber] 文件
選項與參數:
-n:后面接數字,代表行數
number默認值是10 當number是正數(+ number),代表該文件從number以后才會列出來
修改文件時間|創建新文件(touch)
時間屬性
Mtime(modificationtime):當文件內容數據更改時就會更新這個時間,內容數據指的是文件的內容,不包括文件的權限和屬性
Ctime(Statetime):當文件的狀態(權限和屬性)更改時會更新這個時間
Atime(accesstime):當文件內容被取用就會修改這個時間
舉例:
[[email?protected] ~]# ls -l --time-style=long-iso /etc/man.config 默認是修改mtime
-rw-r--r-- 1 root root 4617 2012-05-30 20:34 /etc/man.config
[[email?protected] ~]# ls -l --time=ctime --time-style=long-iso /etc/man.config
-rw-r--r-- 1 root root 4617 2014-02-14 10:06 /etc/man.config
[[email?protected] ~]# ls -l --time=atime --time-style=long-iso /etc/man.config
-rw-r--r-- 1 root root 4617 2014-02-21 10:19 /etc/man.config
語法:touch[-acdmt] 文件
選項與參數:
-a:僅修改訪問時間 atime
-c:僅修改文件的時間,若該文件不存在則不創建新文件
-d:后面可接欲修改的日期,也可以使用—date=”時間或日期”
-m:僅修改mtime
-t:后面可以接欲修改的時間
主要功能:
創建一個空文件
修改文件日期(mtime,atime)
舉例:
[[email?protected] tmp]# cp -a /etc/man.config ./newman.config
[[email?protected] tmp]# ls -l --time-style=long-iso newman.config 指定時間格式
-rw-r--r-- 1 root root 4617 2012-05-30 20:34 newman.config
[[email?protected] tmp]# touch -m -t 0709150203 newman.config //只修改mtime
[[email?protected] tmp]# ls -l --time-style=long-iso newman.config
-rw-r--r-- 1 root root 4617 2007-09-15 02:03 newman.config
[[email?protected] tmp]# ls -l --time=atime --time-style=long-iso newman.config //只修改atime
-rw-r--r-- 1 root root 4617 2014-02-21 10:33 newman.config
[[email?protected] tmp]# touch -a -t 0809150203 newman.config
[[email?protected] tmp]# ls -l --time=atime --time-style=long-iso newman.config
-rw-r--r-- 1 root root 4617 2008-09-15 02:03 newman.config
[[email?protected] tmp]#
[[email?protected] tmp]# touch -d "2 days ago" newman.config //默認修改atime 與 mtime
[[email?protected] tmp]# ls -l --time=atime --time-style=long-iso newman.config
-rw-r--r-- 1 root root 4617 2014-02-19 10:36 newman.config
[[email?protected] tmp]# ls -l --time-style=long-iso newman.config
-rw-r--r-- 1 root root 4617 2014-02-19 10:36 newman.config
原文:http://blog.csdn.net/nohackcc/article/details/19610443
總結
以上是生活随笔為你收集整理的suse linux标准c安装,suse linux安装cmake时ccmake没有安装上的原因的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: linux mkfs.ext3 参数,l
- 下一篇: 马哥linux2020博客,马哥linu