Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2012
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    want to use Locate instead of find as it gives some faster results

    I am using 1-3 TB disks on server

    I used locate command to find files and it was all going well. Then came the need of using some more parameters for finding like finding by size, finding by time & date, etc.

    So I used the locate command and its database as follows
    sudo find $(locate somefile) -<findoption>
    it gave me good results. BUT

    everything was messed up when it was about finding files that have spaces in its name.

    if filenames have spaces then find command divides the output provided by locate command




  2. #2
    Join Date
    Oct 2011
    Location
    Dublin, PA
    Posts
    381
    Thanks
    33
    Thanked 18 Times in 16 Posts
    Rep Power
    10
    You're making my brain hurt...

    I know you could preserve spaces by passing print0, etc.. like:

    find /path/ -name blah -print0 | xargs -0 command

    Trying to think how you could use it in your situation though..

 

 

Similar Threads

  1. Find out who's trying to break into your box
    By Rob in forum Server Security
    Replies: 6
    Last Post: 05-08-2012, 08:58 AM
  2. is it really a lot faster to download using wget?
    By enhu in forum General Linux
    Replies: 5
    Last Post: 12-09-2011, 03:04 PM
  3. Developer Projects Survey Results
    By Fred in forum Linux News
    Replies: 0
    Last Post: 12-08-2011, 07:35 PM
  4. Replies: 0
    Last Post: 11-05-2011, 09:54 AM
  5. 2011 Linux Graphics Survey Results
    By Fred in forum Linux News
    Replies: 0
    Last Post: 10-31-2011, 02:38 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
           








Check out Linux Central for Linux software and other goodies!





» Stats

Members: 3,596
Threads: 3,922
Posts: 9,456
Top Poster: Fred (1,486)
Welcome to our newest member, brandn0007

» Links



Powered by vBadvanced CMPS