stevesweetland
06-10-2003, 12:01 PM
need to know how to find a file from the bash command line.... help?
|
Click to See Complete Forum and Search --> : [Resolved] bash command line stevesweetland 06-10-2003, 12:01 PM need to know how to find a file from the bash command line.... help? jerdo 06-10-2003, 01:19 PM Try this: "locate filename" frymaster 06-12-2003, 11:21 AM or, better still, "find". locate uses a database that yr os updates maybe once a day... so all the results are old. find works like so: find /path -name "some regex*" where /path is the directory structure you want to search and "some regex*" is... well, some regex! that's the uberbasic. believe me, find is insanely powerful. if you need to find all the files owned by root larger than one meg, made before last tuesday, find will do it. stevesweetland 06-13-2003, 12:42 PM thanks a lot guys! any idea how to update the locate database... goldbug 06-13-2003, 12:45 PM systems usually have a command for this, which you might need to run as root. FreeBSD for example,: /usr/libexec/locate.updatedb I'm sure it's different depending on OS/distro, FreeBSD is just the one I use most often. :) do a 'man locate', and the update command is usually "related" at the bottom. gotissues68 06-30-2003, 02:54 AM The linux version of updating the slocate db is "updatedb" from a prompt thats it! :) Need to have root perms. PHP Builder
Copyright Internet.com Inc. All Rights Reserved. |