Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

my current folder is the top of the folder tree structure somewhere inside I have an *.rpm file.

how do I find that *.rpm file in a way that'll list only its full path when found and not list every folder it searches recursively?

share|improve this question
    
rpm? You are not using redhat are you? –  Rinzwind Feb 25 '13 at 19:46
add comment

2 Answers

The easiest method would be to use locate. It will only show the actual file (and directory):

$ locate Screenshot\ from\ 2013-02-13\ 22\:36\:33.png 
/home/rinzwind/Screenshot from 2013-02-13 22:36:33.png

On Ubuntu locate is updated once every do often so it might not find very recent files. You can force an update by issueing a ...

sudo updatedb 
share|improve this answer
add comment

try find . -name [filename] or find . | grep name. find is very useful. You can for example execute commands on your find results find . - name [file to chmod ] -exec chmod 755 {} \;

share|improve this answer
    
To have find output the absolute path: find "$(pwd)" -name filename –  glenn jackman Feb 25 '13 at 21:32
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.