You are on page 1of 5

[student@server0 ~]$ ls --help

用法:ls [選項]... [檔案]...


List information about the FILEs (the current directory by default).
Sort entries alphabetically if none of -cftuvSUX nor --sort is specified.

Mandatory arguments to long options are mandatory for short options too.
-a, --all do not ignore entries starting with .
-A, --almost-all do not list implied . and ..
[student@server0 ~]$ ls
Desktop Documents Downloads Music Pictures Public Templates Videos
[student@server0 ~]$ ls -a
. .bash_profile .config .esd_auth .local Public
.. .bashrc Desktop .gnome2 .mozilla .ssh
.bash_history .cache Documents .gnome2_private Music Templates
.bash_logout .chewing Downloads .ICEauthority Pictures Videos
[student@server0 ~]$ mkdir ". "
[student@server0 ~]$ ls
Desktop Documents Downloads Music Pictures Public Templates Videos
[student@server0 ~]$ ls -a
. .bash_profile Desktop .gnome2_private Pictures
. .bashrc Documents .ICEauthority Public
.. .cache Downloads .local .ssh
.bash_history .chewing .esd_auth .mozilla Templates
.bash_logout .config .gnome2 Music Videos

[student@server0 ~]$ ls -A
. .bashrc Desktop .gnome2 .mozilla .ssh
.bash_history .cache Documents .gnome2_private Music Templates
.bash_logout .chewing Downloads .ICEauthority Pictures Videos
.bash_profile .config .esd_auth .local Public
[student@server0 ~]$ ls -l
總計 0
drwxr-xr-x. 2 student student 6 11 月 25 10:19 Desktop
drwxr-xr-x. 2 student student 6 11 月 25 10:19 Documents
drwxr-xr-x. 2 student student 6 11 月 25 10:19 Downloads
drwxr-xr-x. 2 student student 6 11 月 25 10:19 Music
drwxr-xr-x. 2 student student 6 11 月 25 10:19 Pictures
drwxr-xr-x. 2 student student 6 11 月 25 10:19 Public
drwxr-xr-x. 2 student student 6 11 月 25 10:19 Templates
drwxr-xr-x. 2 student student 6 11 月 25 10:19 Videos
[student@server0 ~]$ ls -la
總計 36
drwx------. 19 student student 4096 11 月 25 11:32 .
drwxrwxr-x. 2 student student 6 11 月 25 11:32 .
drwxr-xr-x. 3 root root 20 1 月 7 2015 ..
-rw-------. 1 student student 32 11 月 25 10:46 .bash_history
-rw-r--r--. 1 student student 18 1 月 29 2014 .bash_logout
-rw-r--r--. 1 student student 193 1 月 29 2014 .bash_profile
-rw-r--r--. 1 student student 231 1 月 29 2014 .bashrc
drwxrwxr-x. 9 student student 4096 11 月 25 11:18 .cache
drwx------. 2 student student 22 11 月 25 10:51 .chewing
drwxr-xr-x. 16 student student 4096 11 月 25 10:46 .config
drwxr-xr-x. 2 student student 6 11 月 25 10:19 Desktop
drwxr-xr-x. 2 student student 6 11 月 25 10:19 Documents
drwxr-xr-x. 2 student student 6 11 月 25 10:19 Downloads
-rw-------. 1 student student 16 11 月 25 10:19 .esd_auth
drwx------. 3 student student 19 11 月 25 11:18 .gnome2
drwx------. 2 student student 6 11 月 25 11:18 .gnome2_private
-rw-------. 1 student student 620 11 月 25 10:46 .ICEauthority
drwx------. 3 student student 18 11 月 25 10:19 .local
drwxrwxr-x. 4 student student 37 11 月 25 11:18 .mozilla
drwxr-xr-x. 2 student student 6 11 月 25 10:19 Music
drwxr-xr-x. 2 student student 6 11 月 25 10:19 Pictures
drwxr-xr-x. 2 student student 6 11 月 25 10:19 Public
drwx------. 2 student student 46 11 月 25 10:26 .ssh
drwxr-xr-x. 2 student student 6 11 月 25 10:19 Templates
drwxr-xr-x. 2 student student 6 11 月 25 10:19 Videos
[student@server0 ~]$ ls -laR
.:
總計 36
drwx------. 19 student student 4096 11 月 25 11:32 .
drwxrwxr-x. 2 student student 6 11 月 25 11:32 .
drwxr-xr-x. 3 root root 20 1 月 7 2015 ..
-rw-------. 1 student student 32 11 月 25 10:46 .bash_history
-rw-r--r--. 1 student student 18 1 月 29 2014 .bash_logout
-rw-r--r--. 1 student student 193 1 月 29 2014 .bash_profile
[student@server0 ~]$ ls -laS
總計 36
drwx------. 19 student student 4096 11 月 25 11:32 .
drwxrwxr-x. 9 student student 4096 11 月 25 11:18 .cache
drwxr-xr-x. 17 student student 4096 11 月 25 11:38 .config
-rw-------. 1 student student 620 11 月 25 10:46 .ICEauthority
-rw-r--r--. 1 student student 231 1月 29 2014 .bashrc
-rw-r--r--. 1 student student 193 1月 29 2014 .bash_profile
drwx------. 2 student student 46 11 月 25 10:26 .ssh
drwxrwxr-x. 4 student student 37 11 月 25 11:18 .mozilla
-rw-------. 1 student student 32 11 月 25 10:46 .bash_history
drwx------. 2 student student 22 11 月 25 10:51 .chewing
drwxr-xr-x. 3 root root 20 1月 7 2015 ..
drwx------. 3 student student 19 11 月 25 11:18 .gnome2
-rw-r--r--. 1 student student 18 1月 29 2014 .bash_logout
drwx------. 3 student student 18 11 月 25 10:19 .local
-rw-------. 1 student student 16 11 月 25 10:19 .esd_auth
drwxrwxr-x. 2 student student 6 11 月 25 11:32 .
drwxr-xr-x. 2 student student 6 11 月 25 10:19 Desktop
drwxr-xr-x. 2 student student 6 11 月 25 10:19 Documents
drwxr-xr-x. 2 student student 6 11 月 25 10:19 Downloads
drwx------. 2 student student 6 11 月 25 11:18 .gnome2_private
drwxr-xr-x. 2 student student 6 11 月 25 10:19 Music
drwxr-xr-x. 2 student student 6 11 月 25 10:19 Pictures
drwxr-xr-x. 2 student student 6 11 月 25 10:19 Public
drwxr-xr-x. 2 student student 6 11 月 25 10:19 Templates
drwxr-xr-x. 2 student student 6 11 月 25 10:19 Videos
[student@server0 ~]$ ls -laSr
總計 36
drwxr-xr-x. 2 student student 6 11 月 25 10:19 Videos
drwxr-xr-x. 2 student student 6 11 月 25 10:19 Templates
drwxr-xr-x. 2 student student 6 11 月 25 10:19 Public
drwxr-xr-x. 2 student student 6 11 月 25 10:19 Pictures
drwxr-xr-x. 2 student student 6 11 月 25 10:19 Music
drwx------. 2 student student 6 11 月 25 11:18 .gnome2_private
drwxr-xr-x. 2 student student 6 11 月 25 10:19 Downloads
drwxr-xr-x. 2 student student 6 11 月 25 10:19 Documents
drwxr-xr-x. 2 student student 6 11 月 25 10:19 Desktop
drwxrwxr-x. 2 student student 6 11 月 25 11:32 .
-rw-------. 1 student student 16 11 月 25 10:19 .esd_auth
drwx------. 3 student student 18 11 月 25 10:19 .local
-rw-r--r--. 1 student student 18 1 月 29 2014 .bash_logout
drwx------. 3 student student 19 11 月 25 11:18 .gnome2
drwxr-xr-x. 3 root root 20 1 月 7 2015 ..
drwx------. 2 student student 22 11 月 25 10:51 .chewing
-rw-------. 1 student student 32 11 月 25 10:46 .bash_history
drwxrwxr-x. 4 student student 37 11 月 25 11:18 .mozilla
drwx------. 2 student student 46 11 月 25 10:26 .ssh
-rw-r--r--. 1 student student 193 1 月 29 2014 .bash_profile
-rw-r--r--. 1 student student 231 1 月 29 2014 .bashrc
-rw-------. 1 student student 620 11 月 25 10:46 .ICEauthority
drwxr-xr-x. 17 student student 4096 11 月 25 11:38 .config
drwxrwxr-x. 9 student student 4096 11 月 25 11:18 .cache
drwx------. 19 student student 4096 11 月 25 11:32 .
-t sort by modification time, newest first
-T, --tabsize=COLS assume tab stops at each COLS instead of 8
-u with -lt: sort by, and show, access time;
with -l: show access time and sort by name;
otherwise: sort by access time
[student@server0 ~]$ ls -latu
總計 36
drwxrwxr-x. 4 student student 37 11 月 25 11:40 .mozilla
drwx------. 3 student student 19 11 月 25 11:40 .gnome2
drwx------. 2 student student 6 11 月 25 11:40 .gnome2_private
drwx------. 3 student student 18 11 月 25 11:40 .local
drwx------. 2 student student 22 11 月 25 11:40 .chewing
drwxr-xr-x. 17 student student 4096 11 月 25 11:40 .config
drwxrwxr-x. 2 student student 6 11 月 25 11:40 .
drwxrwxr-x. 9 student student 4096 11 月 25 11:40 .cache
drwx------. 19 student student 4096 11 月 25 11:32 .
-rw-------. 1 student student 32 11 月 25 10:48 .bash_history
-rw-------. 1 student student 620 11 月 25 10:46 .ICEauthority
drwx------. 2 student student 46 11 月 25 10:26 .ssh
drwxr-xr-x. 2 student student 6 11 月 25 10:26 Public
drwxr-xr-x. 2 student student 6 11 月 25 10:19 Pictures
drwxr-xr-x. 2 student student 6 11 月 25 10:19 Videos
drwxr-xr-x. 2 student student 6 11 月 25 10:19 Music
drwxr-xr-x. 2 student student 6 11 月 25 10:19 Documents
drwxr-xr-x. 2 student student 6 11 月 25 10:19 Downloads
drwxr-xr-x. 2 student student 6 11 月 25 10:19 Templates
drwxr-xr-x. 2 student student 6 11 月 25 10:19 Desktop
-rw-------. 1 student student 16 11 月 25 10:19 .esd_auth
-rw-r--r--. 1 student student 193 11 月 25 10:19 .bash_profile
-rw-r--r--. 1 student student 231 11 月 25 10:19 .bashrc
-rw-r--r--. 1 student student 18 11 月 18 17:10 .bash_logout
drwxr-xr-x. 3 root root 20 5月 7 2014 ..

[student@server0 ~]$ date --help


Usage: date [OPTION]... [+FORMAT]
or: date [-u|--utc|--universal] [MMDDhhmm[[CC]YY][.ss]]
Display the current time in the given FORMAT, or set the system date.

2017-11-25
[student@server0 ~]$ date +%D
11/25/17
[student@server0 ~]$ date +%Y-%m-%d
2017-11-25

2017/11/25 12:00

[student@server0 ~]$ date +%Y/%m/%d %k:%M


date: 出現多餘的參數 ‘%k:%M’
Try 'date --help' for more information.
[student@server0 ~]$ date "+%Y/%m/%d %k:%M"
2017/11/25 12:49

[student@server0 ~]$ passwd


更改使用者 student 的密碼。
正在更改 student 的 STRESS 密碼。
(目前的)UNIX 密碼:
新 密碼:
不良的密碼:密碼無法通過字典比對檢查 - 太簡單/太過於系統化
新 密碼:
不良的密碼:密碼無法通過字典比對檢查 - 根據辭典單字
新 密碼:
再次輸入新的 密碼:
passwd:所有驗證 token 都已成功更新。

----command alias
[student@server0 ~]$ alias <<-----------list command alias
alias egrep='egrep --color=auto'
alias fgrep='fgrep --color=auto'
alias grep='grep --color=auto'
alias l.='ls -d .* --color=auto'
alias ll='ls -l --color=auto'
alias ls='ls --color=auto'
alias vi='vim'
alias which='alias | /usr/bin/which --tty-only --read-alias --show-dot --show-
tilde'
[student@server0 ~]$ alias la='ls -la'
[student@server0 ~]$ la
總計 36
drwx------. 19 student student 4096 11 月 25 11:32 .
drwxrwxr-x. 2 student student 6 11 月 25 11:32 .
drwxr-xr-x. 3 root root 20 1 月 7 2015 ..
-rw-------. 1 student student 32 11 月 25 10:46 .bash_history
-rw-r--r--. 1 student student 18 1 月 29 2014 .bash_logout
-rw-r--r--. 1 student student 193 1 月 29 2014 .bash_profile
-rw-r--r--. 1 student student 231 1 月 29 2014 .bashrc
drwxrwxr-x. 9 student student 4096 11 月 25 11:18 .cache
drwx------. 2 student student 22 11 月 25 10:51 .chewing
drwxr-xr-x. 17 student student 4096 11 月 25 11:38 .config
drwxr-xr-x. 2 student student 6 11 月 25 10:19 Desktop
drwxr-xr-x. 2 student student 6 11 月 25 10:19 Documents
drwxr-xr-x. 2 student student 6 11 月 25 10:19 Downloads
-rw-------. 1 student student 16 11 月 25 10:19 .esd_auth
drwx------. 3 student student 19 11 月 25 11:18 .gnome2
drwx------. 2 student student 6 11 月 25 11:18 .gnome2_private
-rw-------. 1 student student 620 11 月 25 10:46 .ICEauthority
drwx------. 3 student student 18 11 月 25 10:19 .local
drwxrwxr-x. 4 student student 37 11 月 25 11:18 .mozilla
drwxr-xr-x. 2 student student 6 11 月 25 10:19 Music
drwxr-xr-x. 2 student student 6 11 月 25 10:19 Pictures
drwxr-xr-x. 2 student student 6 11 月 25 10:19 Public
drwx------. 2 student student 46 11 月 25 10:26 .ssh
drwxr-xr-x. 2 student student 6 11 月 25 10:19 Templates
drwxr-xr-x. 2 student student 6 11 月 25 10:19 Videos
[student@server0 ~]$ alias
alias egrep='egrep --color=auto'
alias fgrep='fgrep --color=auto'
alias grep='grep --color=auto'
alias l.='ls -d .* --color=auto'
alias la='ls -la' <<---------------------------
alias ll='ls -l --color=auto'
alias ls='ls --color=auto'
alias vi='vim'
alias which='alias | /usr/bin/which --tty-only --read-alias --show-dot --show-
tilde'
[student@server0 ~]$ unalias la
[student@server0 ~]$ la
bash: la: 找不到指令...

------------------------------------

You might also like