Ways to have those directories in the Linux lookup directory

Source: Internet
Author: User
Find a way to have those directories under the directory
内容:[[email protected] kang]# lltotal 16-rw-r--r-- 1 root root    0 May  6 21:21 d.txtdrwxr-xr-x 2 root root 4096 May  6 21:14 kang-rw-r--r-- 1 root root    0 May  5 18:55 kang.txtdrwxr-xr-x 2 root root 4096 May  5 23:40 nginx-rw-r--r-- 1 root root    5 May  5 23:40 test.sh-rw-r--r-- 1 root root   38 May  5 23:27 test.txt方法一:通常方法ls -l | grep ‘^d‘       #正则表达式^...以什么为开头 ,如^d.以d开头方法二:为目录加标识[[email protected] kang]# ls -Fd.txt  kang/  kang.txt  nginx/  test.sh  test.txt[[email protected] kang]# ls -F | grep ‘/$‘      #以...结尾,如/$ 意思是以/结尾。kang/nginx/方法三:find命令[[email protected] kang]# find . -type d !  -name ../nginx./kang

Ways to have those directories in the Linux lookup directory

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.