Linux common command ll is ls-l -- color = auto

Source: Internet
Author: User

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:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.