LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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-28-2011, 02:58 PM   #1
mikezoch
LQ Newbie
 
Registered: Sep 2011
Posts: 2

Rep: Reputation: Disabled
Find all files owned by a user and copy them to a temp folder


How do you find all of the files owned by a user then copy those files to a temp folder?
 
Old 11-28-2011, 03:35 PM   #2
_bsd
Member
 
Registered: Jan 2010
Location: Velveeta, USA
Distribution: Xen, Gentoo,Ubuntu,openSUSE,Debian,pfSense
Posts: 98

Rep: Reputation: 9
Code:
eg: find /beginsearch/path -user name -exec mv -f {} /tmp/dir \;
 
Old 11-28-2011, 03:54 PM   #3
mikezoch
LQ Newbie
 
Registered: Sep 2011
Posts: 2

Original Poster
Rep: Reputation: Disabled
I don't want to move the files just copy them. I'm using RHEL 6 and get a missing argument to -exec.

Never mind forgot the space after the destination folder.

Thank you

Last edited by mikezoch; 11-28-2011 at 03:55 PM.
 
Old 11-28-2011, 06:02 PM   #4
_bsd
Member
 
Registered: Jan 2010
Location: Velveeta, USA
Distribution: Xen, Gentoo,Ubuntu,openSUSE,Debian,pfSense
Posts: 98

Rep: Reputation: 9
obviously change mv to cp
 
  


Reply



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
[SOLVED] Using terminal command -Find files in a folder and copy them to a different folder j-jock Linux - General 4 11-28-2011 02:20 AM
Can't copy files to root owned files! Help! christophercheeseman Linux - General 6 02-01-2011 07:29 PM
Fishy files in temp folder freetommy33 Linux - Security 4 03-03-2009 08:55 AM
Find files and copy the results to desired folder? colbert Linux - Newbie 6 11-08-2008 11:21 PM
is there a way to list all files owned by a user? KingPanda Debian 3 10-29-2008 08:16 PM

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

All times are GMT -5. The time now is 11:39 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
Open Source Consulting | Domain Registration