Linux系統上命令的使用格式

詳細介紹ifconfig、echo、tty、startx、export、pwd、history、shutdown、poweroff、reboot、hwclock、

ifconfig

  • ifconfig [-a] [-v] [-s] <interface> [[<AF>] <address>]
    [add <address>[/<prefixlen>]]
    [del <address>[/<prefixlen>]]
    [netmask <address>] [dstaddr <address>] [tunnel <address>]
    [[-]dynamic]
    [up|down] …

echo

  • Output the ARGs
  • \a alert (bell)
    \b backspace
    \c suppress trailing newline
    \E escape character
    \f form feed
    \n new line
    \r carriage return
    \t horizontal tab
    \v vertical tab

tty

  • Print the file name of the terminal connected to standard input.
  • -s, –silent, –quiet
    print nothing, only return an exit status
  • –help display this help and exit
  • –version
    output version information and exit

startx

  • 啟動圖形化桌面

export

  • export [-nf] [name[=value] …] or export -p

pwd

  • Print the current working directory.
  • With the -P option, pwd prints
    the physical directory, without any symbolic links;
  • the -L option
    makes pwd follow symbolic links.

history

history [-c] [-d offset]

[-n] or history -awrn [filename] or history -ps arg [arg…]

shutdown

  • -h now +時間 ,14:20
  • –no-wall

poweroff

  • -n Don’t sync before reboot or halt. Note that the kernel and storage drivers may still sync.
  • -w Don’t actually reboot or halt but only write the wtmp record (in the /var/log/wtmp file).
  • -d Don’t write the wtmp record. The -n flag implies -d.
  • -f Force halt or reboot, don’t call shutdown(8).
  • -i Shut down all network interfaces just before halt or reboot.
  • -h Put all harddrives on the system in standby mode just before halt or poweroff.

reboot

  • -n Don’t sync before reboot or halt. Note that the kernel and storage drivers may still sync.
  • -w Don’t actually reboot or halt but only write the wtmp record (in the /var/log/wtmp file).
  • -d Don’t write the wtmp record. The -n flag implies -d.
  • -f Force halt or reboot, don’t call shutdown(8).
  • -i Shut down all network interfaces just before halt or reboot.
  • -h Put all harddrives on the system in standby mode just before halt or poweroff.

hwclock

  • hwclock – query and set the hardware clock (RTC) hwclock -r or hwclock –show
    hwclock -w or hwclock –systohc
    hwclock -s or hwclock –hctosys
    hwclock -a or hwclock –adjust
    hwclock -v or hwclock –version
    hwclock –set –date=newdate
    hwclock –getepoch
    hwclock –setepoch –epoch=year
  • date
  • date [OPTION]… [+FORMAT]
    date [-u|–utc|–universal] [MMDDhhmm[[CC]YY][.ss]]
  • %H 小時(以00-23來表示)。 
    %I 小時(以01-12來表示)。 
    %K 小時(以0-23來表示)。 
    %l 小時(以0-12來表示)。 
    %M 分鐘(以00-59來表示)。 
    %P AM或PM。 
    %r 時間(含時分秒,小時以12小時AM/PM來表示)。 
    %s 總秒數。起算時間為1970-01-01 00:00:00 UTC。 
    %S 秒(以本地的慣用法來表示)。 
    %T 時間(含時分秒,小時以24小時制來表示)。 
    %X 時間(以本地的慣用法來表示)。 
    %Z 市區。 
    %a 星期的縮寫。 
    %A 星期的完整名稱。 
    %b 月份英文名的縮寫。 
    %B 月份的完整英文名稱。 
    %c 日期與時間。只輸入date指令也會顯示同樣的結果。 
    %d 日期(以01-31來表示)。 
    %D 日期(含年月日)。 
    %j 該年中的第幾天。 
    %m 月份(以01-12來表示)。 
    %U 該年中的周數。 
    %w 該周的天數,0代表周日,1代表周一,異詞類推。 
    %x 日期(以本地的慣用法來表示)。 
    %y 年份(以00-99來表示)。 
    %Y 年份(以四位數來表示)。 
    %n 在顯示時,插入新的一行。 
    %t 在顯示時,插入tab。 
    MM 月份(必要) 
    DD 日期(必要) 
    hh 小時(必要) 
    mm 分鐘(必要)
    ss 秒(選擇性)

本文來自投稿,不代表Linux運維部落立場,如若轉載,請注明出處:http://www.www58058.com/98137

(0)
墨武墨武
上一篇 2018-05-11
下一篇 2018-05-11

相關推薦

欧美性久久久久