Ben James
05-02-2007, 03:33 PM
Hi, i was wondering if there was a way to seach for files via ssh, because i want to be a able to seach for specific file types like .mp3 which are against my companys tos.
Or if there is a addon script for cpanel which will automaticly do this upon an upload.
Thanks people
Ben
RapidRick
05-02-2007, 06:01 PM
find / -name "*\.mp3"
this will look for files with .mp3 in them. you can also check out the slocate package, which can do the same thing but a whole lot quicker, especially if you want to run this bad boy on cron!
cheers
Ben James
05-02-2007, 06:35 PM
thanks so much, i have seen that befor, but last time i tried it did not work, maybe it was incorrect.
Now it does, thanks soo much
BEN
PrimaryVPS
05-03-2007, 06:44 PM
You actually want to do find /*directorytosearch* -iname *.mp3 which has searches for different cases
HostingFuze
05-03-2007, 06:49 PM
For RHEL servers:
First run:
# updatedb
Then:
# locate filename_or_folder