LinuxQuestions.org
Review your favorite Linux distribution.
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 04-10-2005, 05:21 AM   #1
abhi
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
tommeke
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
homey
Senior Member
 
Registered: Oct 2003
Posts: 3,057

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


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
How do you copy hidden files from one directory to another? Akhran Linux - Newbie 22 12-13-2019 05:20 PM
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

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

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