LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Finding a specific file (https://www.linuxquestions.org/questions/linux-newbie-8/finding-a-specific-file-319511/)

j_carmona 05-02-2005 06:31 PM

Finding a specific file
 
If for example I download a programme (filename.tar.gz), if I double-click on it the file opens and you have a zillion files now in front of you (I use Mandrake 10.1 and sorry I can't remember the name of the apps that open it--I am not at home right now). How do you find a specific file in that list, for example the install.txt file.

Hope I have made myself clear
Many thanks

JC

ahh 05-02-2005 06:40 PM

Presumably the file are in alphabetical order?

j_carmona 05-02-2005 06:42 PM

Yes but they start with their path, and there is no way to arrange by type.
JC

PenguinsAreGood 05-02-2005 06:48 PM

Gnome-
Not familiar so if you're using ask someone else

KDE-
open konqueror ( the little home icon ) and select tools from the menu bar and find file.

command line-
%find . -name install.txt it will start with the current working directory unless specified as: %find / . -name install.txt will search entire system.

in both cases wildcards are acceptable ie install*

hope this helps:)

j_carmona 05-02-2005 06:52 PM

Thanks PenguinsAreGood, I will try tomorrow once I get home.

JC

ahh 05-02-2005 06:54 PM

Ok, I suggest you use "File Roller" (a gnome app) or Ark (a KDE app). If your using Manrake, I guess your using KDE, so this is for Ark:-

File -> Open: select your tar.gz file

At the top of Ark there is a search bar, type the file name in there, if it exists it will be displayed.

You can then left click on it to get a context menu which will allow you to view it or extract or open it etc.

j_carmona 05-02-2005 07:01 PM

That's it ahh, it is Ark I use at home. But like PenguinsAreGood suggested can you use the * to do your search, as I don't know the exact name of the file?

JC

Tinkster 05-02-2005 07:13 PM

Open a shell ...
tar tvzf /<path>/<to>/filename.tar.gz | grep <searchterm>



Cheers,
Tink

j_carmona 05-02-2005 07:16 PM

Thanks Tinkster, I gather that

<path> is the path before the file's name
<to> ???? what is that

Thanks
JC

Tinkster 05-02-2005 07:20 PM

Just a way of expressing that I don't know where (or
how deep) in your directory structure the actuall tar-file
lies ... :)


Cheers,
Tink

j_carmona 05-02-2005 07:35 PM

gotcha. Thanks

JC

ahh 05-02-2005 07:36 PM

Quote:

Originally posted by j_carmona
That's it ahh, it is Ark I use at home. But like PenguinsAreGood suggested can you use the * to do your search, as I don't know the exact name of the file?

JC

Not exactly, but something similar.

When you type in the search bar, once you have typed two letters, the file list will only show the files containing letters you've typed.

e.g. Type "in" and only files containing "in" will show. Add an "s" and only files containing "ins" will show. These would include "insurance" and "collins" if they happened to be the names of files in the archive.

If you have a rough idea of the filename it should get you there.

EDIT: BTW, this is with Ark 2.4.0, can't guarantee it's the same if you have an earlier version :)

EDIT 2: My mistake, you don't have to type two letters, it works as soon as you type the first letter.

j_carmona 05-02-2005 07:42 PM

Thanks ahh. Will check tomorow.

JC


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