LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   find and move to folder and file (https://www.linuxquestions.org/questions/linux-newbie-8/find-and-move-to-folder-and-file-755498/)

dulahdaglace 09-15-2009 09:04 PM

find and move to folder and file
 
okay so I want to find a folder say obscureFolder and then find a file within it say file.txt
ive tried cd | find -type d -name obscureFolder ... so I could look from there, no avail
ive tried it w/ `find ...
i've tried it find -type d -name obscureFolder -exec cd {}
and find -type d -name obscureFolder | find -name file.txt
...and variations thereof..
any ideas?

bigrigdriver 09-15-2009 10:44 PM

The find command expects a search path after the find keyword and before search options.

find /home/username -name file.txt

Assuming you know the top level of the path to the desired file, the command given above will find all examples of file.txt in /home/username.


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