Portal Home > Knowledgebase > Articles Database > search command needed


search command needed




Posted by monitor2000com, 01-18-2011, 01:36 PM
Hello , i`ll be obliged if anyone could send me the following commands : a ) i`m looking for a command to find all the .php files which are uploaded to /home directory on 18jan B ) i use locate command but i don`t why it can`t find any file , give me a best command please to find test.php in /home/*

Posted by Patrick, 01-19-2011, 12:37 PM
1. find /home/ -name "*.php" -mtime 1 -ls | grep "Jan 18" 2. find /home/ -name test.php

Posted by monitor2000com, 01-29-2011, 09:07 AM
Thank you for commands ,

Posted by Patrick, 01-29-2011, 10:58 PM
Forgot to mention, you will need to adjust the -mtime 1 to something else depending on how far back you're trying to search. For example, if you're trying to find a file within the last ten days then use -mtime 10 and narrow it down further with the | grep "Month Day" ... :]

Posted by winlinuxadmins, 01-30-2011, 04:26 PM
monitor2000com, Like to know if that solved your issue



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
F5 lock server (Views: 399)
DNS Webmin Help (Views: 414)

Language: