![]() Where 4 is the file extensions length to include and then find also any extensions beyond that length. Note that the command option name is case sensitive by default. For example, to search for a file named file123.xls in the /home/sourcedigit directory, you would use the following command: find /home/sourcedigit -type f -name file123.xls. type f -name "*.*" | grep -o -E "\.+$" | grep -o -E "]' | sort -u To find a file by its name, use the -name option along with the find command. ![]() So besides the past 12 hours of sitting in regex code for multiple programs and reading and testing these answers this is what I came up with which works EXACTLY like I want. To find any Linux file with an extension, find, locate, and grep commands are used, which search the files from the given path. 9 Answers Sorted by: 363 Try find / -type f -name 'postgis-2.0.0' instead. They all came up short of what I specifically was after. If youre using bash (you probably are), theres a simpler way: shopt -s globstar du -sch /.o. ![]() I tried a bunch of the answers here, even the "best" answer. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |