Linux common command ll is ls-l -- color = auto
1. During Linux system O & M or development, ll (ls-l -- color = auto) commands are often used. For example, ll-hF,
[Bkjia @ localhost ~] $ Ll-hF
Total usage: 1.1 GB
Drwxrwxr-x. 2 bkjia doctor 4.0 K January 18 10:23 Documents/
-Rw-r -----. 1 bkjia doctor 701 M December 24 21:51 Far123-XP-2014.5c.iso
Drwxr-xr-x. 4 bkjia doctor 4.0 K 16:00 Hadoop/
Drwxrwxr-x. 6 bkjia doctor 4.0 K 22:04 hbaseRootDir/
Drwxrwxr-x. 27 bkjia doctor 4.0 K January 17 11:16 opt/
Drwxrwxr-x. 2 bkjia doctor 4.0 K 21:48 save/
Drwxrwxr-x. 2 bkjia doctor 4.0 K 15:26 share/
Drwxrwxr-x. 3 bkjia doctor 4.0 K 21:11 vmware/
-Rwxr-x -- x. 1 bkjia doctor 418 M December 24 23:07 VMware-Workstation-Full-11.0.0-2305329.x86_64 (1). bundle *
Drwxrwxr-x. 3 bkjia doctor 4.0 K 21:03 WebstormProjects/
Drwxrwxr-x. 4 bkjia doctor 4.0 K December 28 08:15 workspace/
Drwxrwxr-x. 4 bkjia doctor 4.0 K October 26 18:28 workspaceForWork/
Drwxrwxr-x. 7 bkjia doctor 4.0 K January 17 23:50 workspace-sts-3.6.2.RELEASE/
Drwxrwxr-x. 5 bkjia doctor 4.0 K 01:25 zookeeper/
Drwxr-xr-x. 2 bkjia doctor 4.0 K 20:05 public/
Drwxr-xr-x. 2 bkjia doctor 4.0 K 21:11 video/
Drwxr-xr-x. 2 bkjia doctor 4.0 K December 7 23:04 image/
Drwxr-xr-x. 4 bkjia doctor 4.0 K 20:58 documents/
Drwxr-xr-x. 3 bkjia doctor 12 K 10:46 download/
Drwxr-xr-x. 3 bkjia doctor 4.0 K 21:09 music/
Drwxr-xr-x. 2 bkjia doctor 4.0 K December 4 21:54 desktop/
-H, -- human-readable
Print sizes in human readable format (e.g., 1 K 234 M 2G)
-F, -- classify, -- file-type
Enclose a character after each file name to indicate the type of the file. "*" Indicates a common executable file; "/" indicates a directory; "@" indicates a symbolic link; "|" indicates OS; "=" indicates a socket (sockets ); nothing indicates a common file.
For convenience, we can also use aliases like alias ll = 'LS-l -- color = auto'
Define an alias:
[Bkjia @ localhost ~] $ Alias ll = 'LS-lhF -- color = auto'
[Bkjia @ localhost ~] $ Ll
Total usage: 1.1 GB
Drwxrwxr-x. 2 bkjia doctor 4.0 K January 18 10:23 Documents/
-Rw-r -----. 1 bkjia doctor 701 M December 24 21:51 Far123-XP-2014.5c.iso
Drwxr-xr-x. 4 bkjia doctor 4.0 K 16:00 hadoop/
Drwxrwxr-x. 6 bkjia doctor 4.0 K 22:04 hbaseRootDir/
Drwxrwxr-x. 27 bkjia doctor 4.0 K January 17 11:16 opt/
Drwxrwxr-x. 2 bkjia doctor 4.0 K 21:48 save/
Drwxrwxr-x. 2 bkjia doctor 4.0 K 15:26 share/
Drwxrwxr-x. 3 bkjia doctor 4.0 K 21:11 vmware/
-Rwxr-x -- x. 1 bkjia doctor 418 M December 24 23:07 VMware-Workstation-Full-11.0.0-2305329.x86_64 (1). bundle *
Drwxrwxr-x. 3 bkjia doctor 4.0 K 21:03 WebstormProjects/
Drwxrwxr-x. 4 bkjia doctor 4.0 K December 28 08:15 workspace/
Drwxrwxr-x. 4 bkjia doctor 4.0 K October 26 18:28 workspaceForWork/
Drwxrwxr-x. 7 bkjia doctor 4.0 K January 17 23:50 workspace-sts-3.6.2.RELEASE/
Drwxrwxr-x. 5 bkjia doctor 4.0 K 01:25 zookeeper/
Drwxr-xr-x. 2 bkjia doctor 4.0 K 20:05 public/
Drwxr-xr-x. 2 bkjia doctor 4.0 K 21:11 video/
Drwxr-xr-x. 2 bkjia doctor 4.0 K December 7 23:04 image/
Drwxr-xr-x. 4 bkjia doctor 4.0 K 20:58 documents/
Drwxr-xr-x. 3 bkjia doctor 12 K 10:46 download/
Drwxr-xr-x. 3 bkjia doctor 4.0 K 21:09 music/
Drwxr-xr-x. 2 bkjia doctor 4.0 K December 4 21:54 desktop/
[Bkjia @ localhost ~] $ 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-lhF -- color = auto'
Alias ls = 'ls -- color = auto'
Alias vi = 'vim'
Alias which = 'Alias |/usr/bin/which -- tty-only -- read-alias -- show-dot -- show-tilde'
I overwrite the alias of the system. Do not use spaces in shell syntax.
2. How to display hidden files? Generally, system commands such as jdk configuration should be defined in. bash_profile. bashrc.
You may think of ls-a, but it also shows other directories.
You can use ls-d. * to display only these hidden directories.
-D, -- directory
List Directory names like other files, rather than their contents.
This article permanently updates the link address: