display the filenames with 4 or more characters using ls

How to display the filenames with 4 or more characters using the ls command

1 Answer

Use wildcards (they're not regexps):

ls -A -d ????*

That's 4 "any characters" followed by "any number of any characters". man ls.

6

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like