WebFeb 8, 2011 · You have almost the right command already, for versions of find that won't let you use dates: find /var/www/html/dir/ -mtime 27 grep '\.php' In general, for find - n means fewer than, n means equal, + n means "more than". Traditional find has some exceptions, but GNU find and other newer versions such as on BSD/Mac OS X corrected those. WebJun 6, 2016 · This solution is using jar command to list the contents of the file and grep the class you are looking for. It will print out the class with package name and also the jar file name. find . -type f -name '*.jar' -print0 xargs -0 -I ' {}' sh -c 'jar tf {} grep Hello.class && echo {}' You can also search with your package name like below:
How to Use the find Command in Linux - How-To Geek
WebMar 6, 2024 · You'll typically use the find command with the syntax find /path -type f -iname filename. You can use a variation of this command to find any file or directory on your Linux machine. We'll break down the … WebMay 1, 2024 · To search for all file matching *book1*, and ignoring case, you could use locate -i book1 if you want to search for files starting with book1 you will need to do the wildcard yourself: locate -i 'book1*' It is much faster than find, but is only as up-to-date as the last time the database was refreshed. Share Improve this answer hyundai i10 for sale in eastbourne
How to list files which contain specific string using linux …
WebThere is du command. Size of a directory and/or file, in a human-friendly way: $ du -sh .bashrc /tmp I memorised it as a non-existent English word dush. --apparent-size command line switch makes it measure apparent sizes (what ls shows) rather than actual disk usage. Share Improve this answer edited Feb 11, 2024 at 23:09 WebAug 6, 2016 · I have the following file vol-12345678 gp2 vol-89dfg58g VOLUMES 2016-03-17T22:03:08.374Z False 100 16 snap-7073d522 in-use vol-4568gds4 gp2 ATTACHMENTS 2016-03-17T22:03:08... WebApr 29, 2009 · Use ls or find to have all the files that were created today. Using ls : ls -ltr grep "$ (date '+%b %e')" Using find : cd $YOUR_DIRECTORY; find . -ls 2>/dev/null grep "$ (date '+%b %e')" Share Improve this answer Follow answered Apr 5, 2024 at 7:09 donaldgavis 367 3 9 2 Don't parse the output of ls. – Ed Morton Aug 2, 2024 at 13:01 … hyundai i10 for sale in sheffield