LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 09-15-2009, 10:04 PM   #1
dulahdaglace
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, 11:44 PM   #2
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,877

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


Reply


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 11:04 AM
Help me...after used mv command all file missing only folder move to new path scoreone1 Linux - General 9 10-21-2008 12:22 AM
find a folder not containing a specific file itzfritz Linux - Server 2 09-10-2008 12:23 PM
making a script that will move a file or files in a trash folder Paxmaster Programming 5 12-12-2004 07:00 PM


All times are GMT -5. The time now is 03:45 AM.

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