LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 01-20-2007, 07:43 PM   #1
Storyman
LQ Newbie
 
Registered: Nov 2005
Posts: 2

Rep: Reputation: 0
Copy select files with command line


What command(s) would I use with the command line if I want to select a subset of files, selected by date modified, and copy that group of files to another directory? Thanks
 
Old 01-20-2007, 07:59 PM   #2
wjevans_7d1@yahoo.co
Member
 
Registered: Jun 2006
Location: Mariposa
Distribution: Slackware 9.1
Posts: 938

Rep: Reputation: 31
Use the find command. Say:

man find

and read all about the -exec option.

Hope this helps.
 
Old 01-21-2007, 01:35 PM   #3
Storyman
LQ Newbie
 
Registered: Nov 2005
Posts: 2

Original Poster
Rep: Reputation: 0
Looks like that's it, thanks
 
Old 01-22-2007, 04:49 AM   #4
wjevans_7d1@yahoo.co
Member
 
Registered: Jun 2006
Location: Mariposa
Distribution: Slackware 9.1
Posts: 938

Rep: Reputation: 31
Remember that the -exec option requires a free-standing semicolon at the end of its operand, so that the find command can, um, find the end of that operand. But shells tend to absorb semicolons for their own purposes, so you may wish to "escape" the semicolon; this will cause the shell to pass that semicolon on to the find command, rather than "using" it. Like this:

find . -name '*.cxx' -exec ls -l {} \;
 
Old 01-22-2007, 08:52 AM   #5
terrorisk
LQ Newbie
 
Registered: Jan 2007
Location: KUala lumPur Malaysia
Distribution: Debian
Posts: 10

Rep: Reputation: 0
thanx bro
nice info
is't FIND can finding file for mount windows file ??
 
Old 01-23-2007, 03:35 AM   #6
wjevans_7d1@yahoo.co
Member
 
Registered: Jun 2006
Location: Mariposa
Distribution: Slackware 9.1
Posts: 938

Rep: Reputation: 31
I don't understand the question. Could you please explain it, maybe using examples?

(Sorry.)
 
  


Reply

Tags
command, copy, line



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
rsync syntax to skip directory, but copy select files.. tnicol Linux - Software 3 07-24-2007 05:40 AM
How to copy files via command line from Redhat to windows chris28 Linux - Networking 5 01-23-2006 11:55 PM
Copy text from command line Duukkis Linux - General 8 08-25-2003 01:29 PM
copy a cd from the command line illtbagu Linux - General 32 02-09-2003 07:08 PM
Copy Paste under command line? Stingreen Linux - General 7 02-10-2002 06:46 PM

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

All times are GMT -5. The time now is 11:30 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