Get the App
SLTechnology News&Howtos  ›  Servers  › 

Display files or directories as required

Shulou Source: shulou.com Published: 2022-06-03 05:25:11 10月05日 Update

1. Show all files or directories ending in.d under/etc directory

Command analysis:

ls: without any parameters, displays files or directories in the current directory

-d: Display only the directory itself, not the files under the directory

* : All files or directories

*.d: All files or directories ending with.d

2. Show all files or directories in/etc directory ending in.conf and beginning with m,n,r,p

Command analysis:

ls: without any parameters, displays files or directories in the current directory

-d: Display only the directory itself, not the files under the directory

[mnrp]: The beginning of/etc/starts with m, n, r, p. [] match any single character in parenthesis

* : All files or directories, put in the middle, that is, any character in the middle

.conf: meaningless, put it at the end and end with.conf

Tags: Directory file beginning parameter command character single meaning parenthesis requirement Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Microsoft Docker Shulou Technology Shulou Tech Info Shulou Information