I have to find all files that have a minimum of 3 letters, starting with the letter l. I'm using this, but it also gives me the files with less than 3 letters.ls | grep ^lIs it possible to determine a minimum length? I just know that the char ? is used to exact lengths.
It is possible to list all files that have at least 3 letters on its name?
shell script
Bash globsDon't use regex. Use globs (assuming you are using bash).ls l??*Explanation? stands for a single character.* stands for zero or more characters.RegexIf you really wanted to use regex, you could usels | grep ^l...*Explanation. stands for a single character..* stands for zero or more characters.