Linux basic command-ls

Source: Internet
Author: User

Linux does not understand basic commands.

Linux is a multi-user, multi-task operating system. windows is also. however, Windows is generally used by a single user. few people use a single machine at the same time. (Windows Server 2003 can be used to enable multiple remote terminals. I have used it .)

 

Absolute path and relative path

Absolute path-start with/, for example,/home/user1/abc.txt

Relative Path-None/start with. user1/abc.txt

If the current path is home, the above example is/home/user1/abc.txt. If it is in Bin, the above example is/bin/user1/abc.txt.

 

Help

Simple help: Add -- help after the command

-A, like -- all, is short and full.

Another help: add the command after help.

For example, help CD

The most detailed help: Man

For example, man ls will display detailed help information about ls commands on the screen. If there is too much content, press enter to roll down a single line, Press space on a single page, and press Q to exit.

 

Tips on the tab key: complete the command.

If you forget the spelling of a command and make as many letters as possible, you can press the tab key to complete it automatically.

 

LsReturns all sub-files and sub-directories in the directory.

Ls-lReturns detailed information about all sub-files and sub-directories, including the Creation Time, user name, user group name, and length.

Ls-Return all sub-files and sub-directories in the directory, including hidden files. Note that all files and folders with A. header in Linux are hidden.

Ls -- color

DIR is a command in windows, and Linux also introduces it.

Different folders have different colors, because the LS command we run is actually ls -- color.

The alias command can be used to view the abbreviation. If we enter alias ls once, we will find: alias ls = 'ls -- color = auto'

When setting, alias ls = "ls-L" is available"

 

 

 

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.