copy syntax part2


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers copy syntax part2
# 1  
Old 07-01-2002
copy syntax part2

hi again and thx for helping

My problem now is that i dont know how to copy files beginning by "." (for instance : .profile)
what syntax should i try?

thx
# 2  
Old 07-01-2002
let try this

source dir
/dir1/dir2/.profile
/dir1/dir2/normal file
/dir1/dir2/dir3/.profile

target dir:
/dir4/dir5

>> cd /dir1
>> cp -R ./dir2 /dir4/dir5

result
/dir4/dir5/dir2/..........

And also the .profile files
# 3  
Old 07-01-2002
Just use cp '.profile' new_name.

This will allow copy with the '.'
# 4  
Old 07-02-2002
I've just seen the context that you want to do this in...please don't start a new thread unless it's a different topic..just append the existing one.

Now in relation to what you want to do..copy all files and directories from one place to another.....just use
cp -R /home/this_directory /home/copy_of_this_directory
This will copy all files including the .profile etc.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

how to copy the directory but not copy certain file

Hi experts cp bin root src /mnt but not copy bin/bigfile any help? ( I post this thread in the "redhat" forum wrongly, I don't know how to withdraw that question in that wrong forum) Thanks (6 Replies)
Discussion started by: yanglei_fage
6 Replies

2. UNIX and Linux Applications

Copy numerous private Samba-shares as one user. (Syntax question)

Hello Forum, I was overwhelmed by how fast and correct the responses to my first question in this forum was, and I hope I expreience this again today. The reason is that I have to copy a fileserver (Ubuntu 8.04 32 with Samba) to another server via Internet within tomorrow. I have no problem... (0 Replies)
Discussion started by: primaxx
0 Replies

3. UNIX for Dummies Questions & Answers

If then else for decimal numbers part2

Hi, I have a small problem with my script. I have everything in order but it doesnt seem to compare anything less than 1 correctly. If the input is more than 1, then the results is correct. If the input is 0.xxx (anything) it returns erroneous results. Pls help input=0.12 if ; then ... (7 Replies)
Discussion started by: streddy
7 Replies

4. UNIX for Dummies Questions & Answers

What is in-core copy and disk-copy of i-node table?

I have found a question from the exercises of my study mat. The question is "Why are there a in-core copy and a disk-copy of i-node block and super block?" If any one know the proper answer then please send me..... (1 Reply)
Discussion started by: dearanik
1 Replies

5. Shell Programming and Scripting

Help with the syntax

can anyone explain the code for me... i am new to shell programming while getopts ":S:D:U:" OPTION "$@" do case $OPTION in S) SRVR=$OPTARG;; D) DB="$OPTARG"; USEDB="use $OPTARG";; U) UID=$OPTARG;; :) MISSINGOPTARG="$MISSINGOPTARG -$OPTARG";; ?) if then ... (2 Replies)
Discussion started by: chandhar
2 Replies

6. Shell Programming and Scripting

grep and delete 2nd duplicated of txt... -part2

Hi, I find out one problem is...the main point is we must delete 2nd duplicated of word in txt file. For example apple orange pink green orange yellow orange red output should be: apple orange pink green yellow orange (16 Replies)
Discussion started by: happyv
16 Replies

7. Shell Programming and Scripting

checking jump sequence number (part2)

The following script have some bug...can you all help me: #!/bin/sh start=1 for file_number in `ls -1 /appl/CH_DATA/archive/list1/CACHE/CDBACKUPFILEJohn*.archived | sort | cut -c 48,49,50,51` do if ; then # this is the first pass of the loop, so we've got nothing to compare start=0... (3 Replies)
Discussion started by: happyv
3 Replies

8. UNIX for Dummies Questions & Answers

copy syntax

Hi How can i copy the whole content of a directory (containing FILES AND DIRECTORIES) in another... thx (3 Replies)
Discussion started by: tomapam
3 Replies
Login or Register to Ask a Question