1. 程式人生 > >Linux系統的幾個有趣命令,你玩過嗎?

Linux系統的幾個有趣命令,你玩過嗎?

1. yes命令,預設會輸出很多個y,可以用來對付選擇很多y/n的應用,同時也支援在yes增加一個引數,這樣也可反覆列印yes後面跟隨的引數,直到CTRL+C殺掉yes程序。

man: yes – output a string repeatedly until killed

2. ddate命令,把日曆轉換成其它的什麼歷,誰能幫忙解釋下這是什麼歷?

man: ddate – converts Gregorian dates to Discordian dates
[[email protected] ~]# ddate
Today is Prickle-Prickle, the 16th day of Discord in the YOLD 3180

3. cal命令,可以根據輸入的月份和年份,打印出該月的日曆:

[[email protected] ~]# cal 3 2014
March 2014
Su Mo Tu We Th Fr Sa
1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31

4. factor命令,分解因數:

[[email protected] ~]# factor 999
999: 3 3 3 37

5. shred命令,覆蓋檔案讓它不能再讀,只能被刪除,這就是傳說中的檔案粉碎機。

man: shred – overwrite a file to hide its contents, and optionally delete it

6. 還可以試試 who is i命令,在試試 who is sb,你會得到很驚訝的回顯:)