LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Finding a specific file in Ubuntu (https://www.linuxquestions.org/questions/linux-software-2/finding-a-specific-file-in-ubuntu-880677/)

Yuhan 05-14-2011 02:28 AM

Finding a specific file in Ubuntu
 
I need to locate a file in my system having to do with backing up the hard drive. I have the file name, but where do I place it to find the appropriate file? Thank you in advance!

xeleema 05-14-2011 03:16 AM

Greetingz!

So you're basically asking "how do I search my computer for a specific file"?
Open a terminal, then type the following;

Code:

sudo find / -type f -name "your filename here"
Would have helped if you had included the filename....

ButterflyMelissa 05-14-2011 03:17 AM

Umm...how about find, or slocate? To be started from the console.

Luck!

Thor

Yuhan 05-14-2011 03:28 AM

Finding a specific file in Ubuntu
 
Okay, sorry I didn't include the file I'm seeking. It is this: /var/BACKUPS/2011-05-06_21:55:37_rsync.log
How do I call up that file? Thanks!

xeleema 05-14-2011 03:35 AM

Okay, so you know where the file is (/var/BACKUPS/) and what the filename is (2011-05-06_21:55:37_rsync.log).
I'm a little confused about exactly what your problem is.

Are you trying to backup that file? Or do you not know how to "see" that file (view the contents)?

Open a "Terminal" (or "Konsole", or "xterm"), and type the following;
Code:

less /var/BACKUPS/2011-05-06_21:55:37_rsync.log

ButterflyMelissa 05-14-2011 04:00 AM

As a humble side note, if you invoke

Quote:

ls /var/BACKUPS
in the console, is the required file in that list? If so, I'm just as confused...if not...that could well be the wrinkle...

(silently looking on to learn something)

Thor

Yuhan 05-14-2011 12:21 PM

Yes, that is the issue--I'm trying to see the contents of that file. When I typed in *less /var/BACKUPS/2011-05-06_21:55:37_rsync.log* the result was a seemingly endless scroll of various script content. Is that the file content?

Yuhan 05-14-2011 01:55 PM

Ah, I think this may be it! What do you think?
*ls -al /var/BACKUPS/* Does this make sense?

Telengard 05-14-2011 02:08 PM

Quote:

Originally Posted by Yuhan (Post 4356393)
*ls -al /var/BACKUPS/* Does this make sense?

  • ls = list files
  • -a = also show . (hidden) files
  • -l = use a long listing format
  • /var/BACKUPS/* = all files and folders within the /var/BACKUPS/ directory
  • ls manpage = more information

FWIW I am also a bit confused as to the real question here.

HTH


All times are GMT -5. The time now is 03:41 PM.