How can I recursively print a list of files with filenames shorter than 25 characters using a one-liner?
问题 I need a one line command for the below requirement. Search all the files from the root directory and print only those files names whose file name length is less than 25. I suppose we can do it with find command something like below: find / -type f |xargs basename .... I am not sure about furthur command. 回答1: My GNU find supports this, unsure whether it's a part of standard find. find / -type f -regextype posix-extended -regex '.*/.{1,24}$' Alternatively, use find | grep. find / -type f |