LS corresponds to various directories, files listed usage

Source: Internet
Author: User
1. List the file and folder full path of the current directory
Ls-1 |awk ' {print i$0} ' i= ' pwd '/'

2, list the current directory and subdirectories of the file, folder full path
Ls-r |awk ' {print i$0} ' i= ' pwd '/'

2b) List the full path of the folder in the current directory and sub-directory
LS-FR | grep/$ | Sed "s:^: ' pwd '/:"

3, with find implementation, it seems to run slower
Find/-name "* *"-exec ls {} \;

4. Recursively lists the current directory and subdirectory names
LS-FR | grep/$

5. Recursively lists the current directory and subdirectory names, including related attributes
LS-LR | grep "^d"
# Drwxr-xr-x 3 idea idea 4096 2 images

6. List only subdirectories under current directory
List subdirectories with LS only
ls-d * *

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.