Locate command problems

Using the locate command to search for things showed the command wasn't bahving correctly:
%locate junk
locate: locate database header corrupt, bigram char outside 0, 32-127: -1
So, I after reading some stuff, I decided to delete the locate.database file and rebuild it. Details:
deleted from /var/db/locate.database
and then with:
/etc/periodic/weekly/310.locate
resulted in:
Rebuilding locate database:
sort: fflush failed: standard output: Broken pipe
sort: write error
Any good ideas?

Post Unix and Terminal queries to the Unix forum under OS X Technologies. FWIW, I don't know why you're having the issue (apparently, something's amiss with your find command). Do note that if you use the periodic weekly method that the locate database will not include many excluded areas. If you want to build a complete locate database, use:
*sudo /usr/libexec/locate.updatedb*

Similar Messages

  • Terminal's "locate" Command Problem

    Howdy,
    I was trying to locate a file that had been autosaved by MS Excel prior to a power outage...
    Not knowing where MS autosaved it's "stuff", I was using Terminal and the "locate" command to try to find the file and it's path, however it wouldn't show up.  I ensured that weekly script had run after the power outage.
    I eventually located the wayward file (trial and error with the finder), but never could get "locate" to find it.  It also appears that "locate" won't find other files in the username/Library/ folder.  Putting the file's full name in with the appropriate quote marks at the beginning and end of the file name didn't help with the "locate."
    Don't know if it helps someone answer my question, but the missing file location was:  ~/Library/Application Support/Microsoft/Office/Office 2011 AutoRecovery.
    I don't remember running into this problem under Mtn Lion, or previous OS's...  I'm not seeing an obvious restriction in the man page about doing a locate in the user/Library folder..
    Thanks for your thoughts...
    Bob

    The second paragraph under "BUGS" in the locate(1) man page says:
         The locate database is typically built by user ``nobody'' and the
         locate.updatedb(8) utility skips directories which are not readable for
         user ``nobody'', group ``nobody'', or world.  For example, if your HOME
         directory is not world-readable, none of your files are in the database.
    My ~/Library directory has permissions 700, so locate wouldn't be able to find
    anything there.  I would use find(1) instead, e.g.:
    find ~/Library -name '*AutoRec*' -print

  • [SOLVED]Locate command not found

    I have recently installed arch, which seems great so far, (including the base, base-devel and a few other things) and I am having one problem. The locate command does not seem to be working from the command line.
    eg:
    locate atlas
    bash: locate: command not found
    Do I need to install something extra to obtain the locate command? Locate is such a common word I am having a little trouble tracking down the problem with google.
    Last edited by TheStatsMan (2010-06-14 09:28:17)

    > pacman -Ss locate
    core/findutils 4.4.2-2 (base)
    GNU utilities to locate files
    core/mlocate 0.22.4-1
    Faster merging drop-in for slocate
    You want mlocate.

  • IPhone 3GS - "LOCATION PINNING" PROBLEM ON THE MAP

    Hi everyone. I'm currently using an iPhone 3GS running on IOS4 and unfortunately facing "location pinning problem" on the map. Even though, "location services" feature is on and also "active" for photos, I quite often need to reboot my device right after I took a picture(s) in order to see the "location pin(s)" on the map.
    But sometimes I don't need to do so, because it somehow captures the place the picture's taken and puts a pin on the map right away.
    Do you have any ideas about where that problem might be stemming from? Appreciate your help on this issue. Thx a lot in advance...

    so did you happen to resolve that "pinpointing" issue?

  • SQL Command problem in Application Express 3.2.0.00.27

    To Oracle Application Express Development Team,
    Yesterday I installed Oracle Application Express 3.2.0.00.27.
    While doing my r&d, I came across one problem in SQL Command.
    For example I wanted to run sql "select * from tab"
    When I checked "Autocommit" checkbox it worked fine.
    But when I unchecked the "Autocommit" checkbox it gave me following error:
    ORA-01003: no statement parsed
    Please check post
    http://www.oraclebrains.com/2009/03/sql-command-problem-in-application-express-3200027/ for more details.
    Cheers

    I can't find the log file (a good indication that something went wrong)
    Here's the transcript of the session...
    SQL> startup upgrade
    ORACLE instance started.
    Total System Global Area 599785472 bytes
    Fixed Size 1288820 bytes
    Variable Size 264242572 bytes
    Database Buffers 331350016 bytes
    Redo Buffers 2904064 bytes
    Database mounted.
    Database opened.
    SQL> @apxpatch.sql
    PL/SQL procedure successfully completed.
    PL/SQL procedure successfully completed.
    Wrote file apxset.sql
    PL/SQL procedure successfully completed.
    PL/SQL procedure successfully completed.
    SQL>
    SQL> @apxldimg.sql
    PL/SQL procedure successfully completed.
    Enter value for 1: C:\Documents and Settings\jtench\Desktop\My Downloads\Oracle\apex_3.2.1
    old 1: create directory APEX_IMAGES as '&1/apex/images'
    new 1: create directory APEX_IMAGES as 'C:\Documents and Settings\jtench\Desktop\My Downloads\Oracle\apex_3.2.1/apex/images'
    Directory created.
    PL/SQL procedure successfully completed.
    PL/SQL procedure successfully completed.
    PL/SQL procedure successfully completed.
    Commit complete.
    timing for: Load Images
    Elapsed: 00:03:30.03
    Directory dropped.
    SQL>

  • How make "locate" command index user files?

    My Mac has my home folder on an internal HD (with the startup disk on internal SSD). How do I get the "locate" command to index (and hence be able to find) all files that are in my user folder (~/) and its subfolders?
    I want to be able to do this without changing permissions on my user files, of course.

    ...does mdfind find anything not already found by Spotlight?
    It displays all search results, which the Spotlight GUI doesn't, by default.
    And is some maintenance required or recommended to keep the metadata database current?
    No.
    Spotlight Overview: How Does Spotlight Work?

  • A locate command for solaris

    Hi all,
    does anyone know any equivalent to the locate command for Solaris?
    Thanks all
    Here I'm helping others to find it faster than me :-)
    locate for solaris
    locate equivalent for solaris
    how to find files in solaris
    how to find directories in solaris
    find filenames quickly

    This would be a good question for one of the forums on opensolaris.org, you might
    get better answers there. If the file you are looking for was installed via packages,
    then you can use the package database to look it up.
    I think you have to be root (which is lame). Here is an example for
    the file "libxil.so.1"
    # pkgchk -l -P libxil.so.1
    Pathname: /opt/SUNWits/Graphics-sw/xil/lib/libxil.so
    Type: symbolic link
    Source of link: /usr/openwin/lib/libxil.so.1
    Referenced by the following packages:
    SUNWxilrl
    Current status: installed
    Pathname: /opt/SUNWits/Graphics-sw/xil/lib/libxil.so.1
    Type: symbolic link
    Source of link: /usr/openwin/lib/libxil.so.1
    Referenced by the following packages:
    SUNWxilrl
    Current status: installed
    Pathname: /usr/lib/libxil.so
    Type: symbolic link
    Source of link: ./libxil.so.1
    Referenced by the following packages:
    SUNWxwrtl
    Current status: installed
    Pathname: /usr/lib/libxil.so.1
    Type: symbolic link
    Source of link: ../openwin/lib/libxil.so.1
    Referenced by the following packages:
    SUNWxwrtl
    Current status: installed
    Pathname: /usr/openwin/lib/libxil.so
    Type: symbolic link
    Source of link: libxil.so.1
    Referenced by the following packages:
    SUNWxilrl
    Current status: installed
    Pathname: /usr/openwin/lib/libxil.so.1
    Type: regular file
    Expected mode: 0755
    Expected owner: root
    Expected group: bin
    Expected file size (bytes): 952740
    Expected sum(1) of contents: 59048
    Expected last modification: Jan 22 19:00:53 2005
    Referenced by the following packages:
    SUNWxilrl
    Current status: installed

  • Locate command not working

    On every mac computer that I have used that is running 10.9 or greater, I cannot seem to get the UNIX locate command to work. When first run, it gave me an option to generate the locate database, which I did, but for whatever reason, whenever I try locating a file that I know exists, it doesn't return any results.

    sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.locate.plist

  • How to change Host directory location?(Problems with host and ed)

    Hi I'm having a problem with the commands Host and Ed. The problem being that when I run them they send back an error saying
    SQL>host
    /bin/gnome-terminal: No such file or directory
    or
    SQL> ed
    Wrote file /home/joe/Documents/editfile.sql
    /bin/gnome-terminal: No such file or directory
    The problem is that /bin/gnome-terminal is not the correct location for my terminal directory, /usr/bin/gnome-terminal is. Are there any suggestions how I can be able to change it? I'm running SQLPlus 11.2.0.1.0 and I'm using ElementaryOS(made from Ubuntu). Let me know if there is any other information needed to help fix this.

    This is not a SQL or PL/SQL language question  and thus off topic. As it is Linux o/s related, I think it is better suited for the Oracle Linux forum space.
    My guess is, from the little info posted, that your TERM environment variable is not correctly set.

  • PL/SQL Procedure Calling Java Host Command Problem

    This is my first post to this forum so I hope I have chosen the correct one for my problem. I have copied a java procedure to call Unix OS commands from within a PL/SQL procedure. This java works well for some OS commands (Eg ls -la) however it fails when I call others (eg env). Can anyone please give me some help or pointers?
    The java is owned by sys and it looks like this
    CREATE OR REPLACE AND COMPILE JAVA SOURCE NAMED "ExecCmd" AS
    //ExecCmd.java
    import java.io.*;
    import java.util.*;
    //import java.util.ArrayList;
    public class ExecCmd {
    static public String[] runCommand(String cmd)
    throws IOException {
    // set up list to capture command output lines
    ArrayList list = new ArrayList();
    // start command running
    System.out.println("OS Command is: "+cmd);
    Process proc = Runtime.getRuntime().exec(cmd);
    // get command's output stream and
    // put a buffered reader input stream on it
    InputStream istr = proc.getInputStream();
    BufferedReader br = new BufferedReader(new InputStreamReader(istr));
    // read output lines from command
    String str;
    while ((str = br.readLine()) != null)
    list.add(str);
    // wait for command to terminate
    try {
    proc.waitFor();
    catch (InterruptedException e) {
    System.err.println("process was interrupted");
    // check its exit value
    if (proc.exitValue() != 0)
    System.err.println("exit value was non-zero: "+proc.exitValue());
    // close stream
    br.close();
    // return list of strings to caller
    return (String[])list.toArray(new String[0]);
    public static void main(String args[]) throws IOException {
    try {
    // run a command
    String outlist[] = runCommand(args[0]);
    for (int i = 0; i < outlist.length; i++)
    System.out.println(outlist);
    catch (IOException e) {
    System.err.println(e);
    The PL/SQL looks like so:
    CREATE or REPLACE PROCEDURE RunExecCmd(Command IN STRING) AS
    LANGUAGE JAVA NAME 'ExecCmd.main(java.lang.String[])';
    I have granted the following permissions to a user who wishes to run the code:
    drop public synonym RunExecCmd
    create public synonym RunExecCmd for RunExecCmd
    grant execute on RunExecCmd to FRED
    grant javasyspriv to FRED;
    Execute dbms_java.grant_permission('FRED','java.io.FilePermission','/bin/env','execute');
    commit
    Execute dbms_java.grant_permission('FRED','java.io.FilePermission','/opt/oracle/live/9.0.1/dbs/*','read, write, execute');
    commit
    The following test harness has been used:
    Set Serverout On size 1000000;
    call dbms_java.set_output(1000000);
    execute RunExecCmd('/bin/ls -la');
    execute RunExecCmd('/bin/env');
    The output is as follows:
    SQL> Set Serverout On size 1000000;
    SQL> call dbms_java.set_output(1000000);
    Call completed.
    SQL> execute RunExecCmd('/bin/ls -la');
    OS Command is: /bin/ls -la
    total 16522
    drwxrwxr-x 2 ora9sys dba 1024 Oct 18 09:46 .
    drwxrwxr-x 53 ora9sys dba 1024 Aug 13 09:09 ..
    -rw-r--r-- 1 ora9sys dba 40 Sep 3 11:35 afiedt.buf
    -rw-r--r-- 1 ora9sys dba 51 Sep 3 09:52 bern1.sql
    PL/SQL procedure successfully completed.
    SQL> execute RunExecCmd('/bin/env');
    OS Command is: /bin/env
    exit value was non-zero: 127
    PL/SQL procedure successfully completed.
    Both commands do work when called from the OS command line.
    Any help or assistance would be really appreciated.
    Regards,
    Bernard.

    Kamal,
    Thanks for that. I have tried to use getErrorStream and it does give me more info. It appears that some of the commands cannot be found. I suspected that this was the case but I am not sure about how this can be as they all appear to reside in the same directory with the same permissions.
    What is more confusing is output like so:
    SQL> Set Serverout On size 1000000;
    SQL> call dbms_java.set_output(1000000);
    Call completed.
    SQL> execute RunExecCmd('/usr/bin/id');
    OS Command is: /usr/bin/id
    exit value was non-zero: 1
    id: invalid user name: ""
    PL/SQL procedure successfully completed.
    SQL> execute RunExecCmd('/usr/bin/which id');
    OS Command is: /usr/bin/which id
    /usr/bin/id
    PL/SQL procedure successfully completed.
    Regards,
    Bernard

  • How can we change the default folder location (avoiding problems with Temporary Internet Files)

    (Environment in question: Windows 7 secure desktop (running as user not admin), Office 2010)
    Hello,
      As has been touched on in various forums (such as here: http://forums.adobe.com/thread/797451), when one opens a PDF attachment in Outlook, Acrobat and Reader store the file in the "Temporary Internet Files" folder (f/k/a OLK folder in previous versions of Outlook.  There are two major problems with this:
      First, as Microsoft has documented in http://support.microsoft.com/kb/817878, attachments end up here staying here under certain conditions (go checks your now, you'll find some!), which ends up being a file attachment no man's land, and that can present security risks (e.g. if data we thought was deleted still lives in that folder).
      Secondly, the first time you open an attachment in Acrobat and do a Save As, Acrobat is defaulting to the Temporary Internet Files location.  This folder (as noted in the thread linked above) is ridiculously hard to get to for the average user, so they can end up storing a file and then losing it.
      We've found that if we open Acrobat once, do a save as, and change to the users Documents folder, the change sticks.  But how can we have Acrobat default to Documents instead of that temporary location? 
      Any help is greatly appreciated.

    Have you check to see if Acrobat sets a registry entry or file preference for the first Save As?  That's where I would start looking.  Process Monitor is a good tool for this.

  • Custom command problems on Mac OS X

    I am seeing a problem with custom context commands in our custom connector that is also reproducible with the sample FTP connector shipped with the SDK.  I am using Adobe Drive 3.2.0.41 on Mac OS X 10.8.2
    For my test I am connecting to a FTP server and attempting to run the "File Properties" command from a file's Adobe Drive menu in Finder.  When I first start Drive and connect, the command works and the "File Properties" dialog appears as expected.  However, if I disconnect, reconnect, then browse back to the file and attempt the command again, the File Properties dialog does not appear.  The Finder window does kind of "grey out" as if another dialog is about to be shown, but it never is. I don't see any kind of error messages in the CS5ServiceManager logs. 
    If I disconnect, close Drive, kill the AdobeDriveCS5 and CS5ServiceManager processes with Activity Monitor, and then restart Drive and reconnect, the custom commands work again.
    Has anyone else experienced these kinds of problems with custom commands on Mac OS after a disconnect/reconnect cycle?
    Thanks,
    Brian

    Our only other environment we could set up was on Mac OS 10.7.5, and we could not reproduce the issue.  Based on that it would appear to be something new with Mac OS 10.8.

  • SR510 Lock-in Amplifier Repeated Data Output Command Problem

    Hi,
    I'm using LabVIEW version 7.1 with an SR510 lock-in amplifier connected through GPIB-488.2. I've gotten past most of the hurdles, the device appears in MAX and I can send and recieve data using the VISA test panel. My main goal is to be able to have a VI where I am continuously asking the SR510 to output a voltage number while the data recieved is then saved in a .txt document and graphed as a function (simple x-y). The issue I am having is that the SR510 will not take more than one "q" command to output data. I can clear the settings of the lock-in with a "z" command, and then give it a "q" command and it will output correct information but if I try to run it continuously I get an error. I've tried using variations of the same "q" command (e.g. adding a needed carriage return, \r, \n) but none of them produce any different results. I should also mention that this issue only occurs with the "q" or output data command. Other write/read commands can be issued multiple times in rapid succession without any issues. I would be greatful if anyone had any advice as to why this might be occurring. Also I apologize if some of my terminology is incorrect as I was only just introduced to LabVIEW a few days ago.
    Thank you for your time,
    Sal

    If you are brand new to LabVIEW, I would recommend looking at the VISA/GPIB shipping example to familiarize yourself with the different functions and how they interact.  Go to Help»Find Examples... to open the example finder.  The GPIB example is located in Hardware Input and Output»VISA»GPIB-VISA.vi.
    When you say " I can clear the settings of the lock-in with a "z" command, and then give it a "q" command and it will output correct information but if I try to run it continuously I get an error." do you mean that you try and continously give it a "q" command and then a "z" command and it errors, or you just give it a "q" command?  It may be possible to alternate between a "q" and "z" command inside a while loop to continuously output and then clear the settings and output again.  It may also be that this device is not capable of continous output.  I would check the user manual to see if this kind of operation is possible, and if so how to accomplish it.  Let me know how it goes and if you have any more questions.
    Regards,
    Chris L
    Applications Engineer
    National Instruments
    Certified LabVIEW Associate Developer

  • Host Command Problems on 9i Unix

    I am using web froms 9i running on a Unix server with 9iasr2. I am trying to manipulate files on the server not the client. I have tried:
    host('rm -f /mypath/filename.txt')
    host('rm -f /mypath/filename.txt',NO_SCREEN)
    host('touch /mypath/filename.txt')
    host('touch /mypath/filename.txt', NO_SCREEN)
    host('mv /mypath/file1.txt /mypath/file2.txt')
    The file I am trying to delete is one that was transfered using the webutil file transfer.
    I have tried to check the status with:
    IF NOT Form_Success THEN
         Message('Error -- Message not sent.');
    ELSE
         Message('Message Sent.');
    END IF;
    I always get back 'Error...'
    The directories have permission open to everyone. Therefore I would of expected no problems with doing a touch to create a file.
    Any ideas?

    Thanks Ino. That was it, the full path for the unix command itself was missing. I knew it was something simple. =)

  • Location search problem with iPhone map

    I am posting this to see if anybody else have the same problem, and hopeful a solution as well.
    The problem is that iPhone map started from a 3ird party software does not use my current location by default. For example, I did a search for pizza in google search. The google app will give me a list of local pizza places in their page. But if I click on show all results, it brings up the map app and displays a few pizza places around the world. But shouldn't it give me results in my local area instead? At first, I thought this is a google problem. But I see the same problem later with another voice search app. Have anyone experience this with their iPhone?
    Thanks in advance to any insight on this.

    I've already done it.
    Do you think this will help?
    I doubt that Apple will listen to us. Users with a problem that occurs quite a lot.

Maybe you are looking for

  • IPhone 5: Voice Memos not working in iOS 6.1.4

    I updated my iPhone 5 and suddenly my voice memos app doesn't work. When I click on it, it loads the microphone icon then closes and goes back to the main screen.  Can anyone help on this issue?

  • How to make the generated xl reporter un editable

    Dear Experts One of my client is asking , they want to generate the report in xl reporter (all kinds of report) but the end user must not edit that report. He just need only read only facility. So how to generate a read only report in xl reporter I n

  • Maintaining internal links on Word files placed into Indesign

    I want to bring a word file into Indesign, which has a very large number of internal links. When I place the file in Indesign, the external  hyperlinks transfer as well as bookmarks, but the internal links do not., The blue colour and the underlining

  • Lumia 930 app like glance screen

    I need some app which will work something like glance screen - peak option. I have Nokia cp-637 case, and wish some applications which will turn on screen when I open cp-637 case. Something like on Samsung.

  • Display GIS Map in Webdynpro

    Hi Experts: I have installed IGS and I trying to use Geomap in webdynpro. I get an error "Graphic Rendering Problem". But i could display a chart. Why this error occurs. What is GFW chart? and What is MIS chart? Can anybody give me some tips ? Thanks