Linux / UNIX Tech Support Forum
This is a discussion on How to copy . files from current directory within the Linux software forums, part of the Linux Getting Started category; Just stuck with a small trivial problem. I have a directory called dir1 and inside there are a few .hidden ...
|
|||||||
| Linux software General questions and discussion about Redhat/Fedora Core/Cent OS, Debian and Ubuntu Linux related to softwares should go here. |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
Just stuck with a small trivial problem. I have a directory called dir1 and inside there are a few .hidden files, normal files and directory files.
If I try to copy using " cp -rp dir1/.* /testdir/ ", then it copies the parent directory above the dir1 also... i.e, even .. My question is....what is the syntax to copy .hidden files and .hiddendirs below the current directory to another directory?. ricc |
| Sponsored Links | ||
|
|
|
||||
|
I see, use -a option
Code:
cp -av dir1/ testdir/ Code:
cp dir1/.file testdir
__________________
Vivek Gite Linux Evangelist |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) |
|
| Thread Tools | |
| Display Modes | |
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Linux Copy an audio cd / track to hard disk | Peterrodg | Getting started tutorials | 2 | 12-01-2008 10:50 PM |
| UNIX Display or list number of files in a current directory | raj | Getting started tutorials | 1 | 07-12-2007 10:55 AM |
| Need help writing simple copy script | z3cka | Shell scripting | 4 | 27-08-2006 02:29 PM |
| Linux use ghost or copy a partition to another drive | raj | Linux software | 2 | 17-07-2006 01:56 AM |
| DVD copy howto | tom | Getting started tutorials | 1 | 11-01-2006 10:43 PM |