LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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 11-09-2009, 05:51 AM   #1
gauravjain111
LQ Newbie
 
Registered: Nov 2009
Posts: 3

Rep: Reputation: 0
Question How to find a filename which contain particular pattern and want to move to


Hi Friends,

Can you help me on this...

How to find a filename which contain particular pattern and want to move to another directory

Jain
 
Old 11-09-2009, 05:55 AM   #2
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
Welcome to LQ
Code:
man find
would be a good start
 
Old 11-09-2009, 06:01 AM   #3
gauravjain111
LQ Newbie
 
Registered: Nov 2009
Posts: 3

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by repo View Post
Welcome to LQ
Code:
man find
would be a good start

I have not find my answer

Please
 
Old 11-09-2009, 06:21 AM   #4
gauravjain111
LQ Newbie
 
Registered: Nov 2009
Posts: 3

Original Poster
Rep: Reputation: 0
Hi


Plz anybody help me...
Thanks in advance...
 
Old 11-09-2009, 06:22 AM   #5
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,724

Rep: Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705
The find man page is full of information, but it can be somewhat painful to consume in one sitting...

Here is an example that does the type of thing you are asking for. To understand it you'll need to look at both the find man page, specifically regarding the '.', -name and -exec (and {} +), and the mv man page for the '-t';

Code:
find . -name '*.mp3' -exec mv -t ~/music {} + ;
If you have questions about the above, please make them specific to show that you did the required reading ;-)

EVo2.
 
  


Reply

Tags
help, plz



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
need a script that will copy based on filename and then move to a network share when mrgreaper Linux - Newbie 6 09-27-2009 08:21 PM
Find/grep/wc command to find matching files, print filename and word count dbasch Linux - Newbie 10 09-14-2009 05:55 PM
How to remove bad filename pattern from every file in one folder? jaytd Linux - Newbie 3 07-16-2009 02:55 AM
Replacing a image filename with a regex pattern in a script jonaster Linux - General 1 09-05-2006 07:02 PM
pattern search through find command. abhi Linux - Newbie 2 04-11-2005 10:31 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:18 PM.

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
Open Source Consulting | Domain Registration