Visit Jeremy's Blog.
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 04-10-2005, 05:21 AM   #1
LQ Newbie
Registered: Apr 2005
Location: India
Distribution: REd Hat AS 3.0
Posts: 4

Rep: Reputation: 0
Lightbulb search special files and copy in directory.

Hi this is my first message to forum .
I got stuck in a problem i wants to copy all character special file or any special file from directory Hierarchy to one directory.
i ran command
$ find /dev/ -type c -exec cp * ./ {} \;
But it doesn't give me proper result.
Old 04-10-2005, 08:49 AM   #2
LQ Newbie
Registered: Apr 2005
Location: Belgium
Distribution: Debian
Posts: 18

Rep: Reputation: 0
why "*" ?
why not cp {} ./ \;
{} represents the the char file found, so cp {} ./ copies the found char file to ./
Old 04-10-2005, 09:22 AM   #3
Senior Member
Registered: Oct 2003
Posts: 3,057

Rep: Reputation: 59
Try this..
find /dev -type c -exec cp -R {} /new/folder \;


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
How do you copy hidden files from one directory to another? Akhran Linux - Newbie 19 12-29-2011 03:31 AM
copy 3 files to a directory and all subdirectories? snip128 Linux - Newbie 9 08-12-2005 09:18 PM
copy files from directory to directory without subfile ALInux Linux - General 2 06-03-2005 11:51 AM
search and copy multiple files NiallC Programming 2 04-29-2005 04:40 AM
locate and copy files - without directory tree rodda Linux - General 1 01-16-2005 02:10 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:41 PM.

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