Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 09-15-2009, 09:04 PM   #1
LQ Newbie
Registered: Sep 2009
Posts: 1

Rep: Reputation: 0
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?
Old 09-15-2009, 10:44 PM   #2
LQ Addict
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,906

Rep: Reputation: 353Reputation: 353Reputation: 353Reputation: 353
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.


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 Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
find a folder containing a specific file amicke Linux - General 3 04-20-2009 10:04 AM
Help me...after used mv command all file missing only folder move to new path scoreone1 Linux - General 9 10-20-2008 11:22 PM
find a folder not containing a specific file itzfritz Linux - Server 2 09-10-2008 11:23 AM
making a script that will move a file or files in a trash folder Paxmaster Programming 5 12-12-2004 06:00 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:32 AM.

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