LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 01-30-2006, 09:30 PM   #1
anjanesh
Member
 
Registered: Sep 2004
Location: Navi Mumbai
Distribution: Ubuntu 14.04 64-bit
Posts: 230

Rep: Reputation: 30
Unable to locate in bash


I had uploaded a test.zip to public_html/test folder using FileZilla. Couldnt use WinSCP as it was hanging for this server.
I can get in through Putty though but cannot seem to find the file test.zip's path.
Code:
-bash-2.05b$ locate test.zip
warning: locate: could not open database: /var/lib/slocate/slocate.db: Permission denied
warning: You need to run the 'updatedb' command (as root) to create the database.
-bash-2.05b$
Any ideas whats wrong here ?
Thanks
 
Old 01-30-2006, 09:54 PM   #2
frob23
Senior Member
 
Registered: Jan 2004
Location: Roughly 29.467N / 81.206W
Distribution: OpenBSD, Debian, FreeBSD
Posts: 1,450

Rep: Reputation: 48
Quote:
You need to run the 'updatedb' command (as root) to create the database.
Have you tried this?
 
Old 01-30-2006, 10:14 PM   #3
matthalliday
Member
 
Registered: Jan 2006
Location: Brisbane, Australia
Distribution: Suse, Mandrake, IPCop, Debian, Slackware
Posts: 34

Rep: Reputation: 15
As frob23 said, you should try that command. It should solve your problem.

However, if your just locating it, have you tried:

$ ls -l /home/(your username)/public_html/test

I can't remember if it is in the home directory or if it is in, say, apache's.
 
Old 01-30-2006, 10:33 PM   #4
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 683Reputation: 683Reputation: 683Reputation: 683Reputation: 683Reputation: 683
If I understand the question, you used an ftp client to "put" a file in a remote server's <your account>/public_html/ folder. You could try ftp'ing into the account and using "ls" or "dir" to see if the file is there. If you have secure shell access then you can use the secure shell, cd to the folder and list the contents. There is also the find command.

If this is a remote server, and you don't have root access, you won't be able to run "updatedb" as root. On some systems, this command is run as an imaginary user named "nobody" who has very limited rights, and the locate command may not list your files, unless any other user can also view your files.
I hope my assumptions are correct.

Last edited by jschiwal; 01-30-2006 at 10:35 PM.
 
Old 01-30-2006, 10:46 PM   #5
anjanesh
Member
 
Registered: Sep 2004
Location: Navi Mumbai
Distribution: Ubuntu 14.04 64-bit
Posts: 230

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by matthalliday
$ ls -l /home/(your username)/public_html/test
Thanks - this was the location alright !
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Knoppix 3.8 Unable to locate RSDP babelbrennt Linux - Distributions 4 11-10-2005 05:59 AM
Problems with 'locate' in bash Ariox Slackware 16 08-24-2005 11:53 PM
unable to locate modules. cambie Red Hat 2 11-25-2004 11:08 AM
unable to locate some rpms ! akhalaf Fedora 2 06-30-2004 08:26 AM
unable to locate safe_mysqld ziggie216 Linux - Software 1 06-14-2004 08:29 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 07:08 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration