Simple cp command giving problem..HELP !!!


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Simple cp command giving problem..HELP !!!
# 1  
Old 06-10-2008
Simple cp command giving problem..HELP !!!

i am new user to unix. just started today. i have a task on my hand. please help me out.this may be the most simplest question to you guys.

i have to upload a file ABC in some directory for example lib..i am already at the promt where i want to load that directory

now my destination directory i.e. the directory i want to copy is in home/username/Desktop/XYZ

i try giving this command:
$ cp /home/username/Desktop/XYZ .

but it doesnt work ...please help...
thank you
# 2  
Old 06-10-2008
Hi ,

Use the below commands for copy ..

To copy a file

cp <source_file> <new_file_name>
----------------------------------------

To copy a complete directiory

cp -r <source_dir> <new_dir_name>

=============================


In your case


To copy the complete XYZ dirctory (including all files present under that dir)..

cp -r /home/username/Desktop/XYZ .

-----------------------------------

To copy a file


cp /home/username/Desktop/XYZ/<file_name> .


Note: -r means recursive copy
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Grep command giving different result for different users for same command

Hello, I am running below command as root user #nodetool cfstats tests | grep "Memtable switch count" Memtable switch count: 12 Where as when I try to run same command as another user it gives different result. #su -l zabbix -s /bin/bash -c "nodetool cfstats tests | grep "Memtable switch... (10 Replies)
Discussion started by: Pushpraj
10 Replies

2. AIX

Lsof command giving while loop

Hello, There is a process in AIX which is actually a oracle database user session but is running very slow When I use lsof it give below output lsof /proc/21955180 In while loop:256 In while loop:256 In while loop:256 In while loop:256 Value of I :183 np:1024 Please... (1 Reply)
Discussion started by: Vishal_dba
1 Replies

3. Shell Programming and Scripting

special characters giving problem

Hi All, I have a CSV file in which some fields contains special character for ex:- my file is file 1 cat file1 abcd,bgfht,ngbht,abvc **** hdlld,hsgdt,bhfy,knht **** whenever i am trying to put a 4th feild in a variable its giving me list of all the files i have in current... (6 Replies)
Discussion started by: sam25
6 Replies

4. Shell Programming and Scripting

tr command giving wrong output

Hi All, i have a file which have many fields delimited by ,(comma) now i have to show only few fields and not all. the sample text file looks like this: TYPE=SERVICEEVENT, TIMESTAMP=05/06/2009 11:01:40 PM, HOST=sppwa634, APPLICATION=ASComp, FUNCTION=LimitsService, SOU... (8 Replies)
Discussion started by: usha rao
8 Replies

5. Shell Programming and Scripting

simulation of wc command giving problems

Hello, i am developing a simple shell script for simulation of wc command but it's not working.Please tell me what is the problem. I have commented the problematic line if then echo "<Improper Usage>" echo "wcassg <options> file" else eval file=\$$# if then chars=0 words=0... (2 Replies)
Discussion started by: salman4u
2 Replies

6. UNIX Desktop Questions & Answers

uuencode for attachment giving problem

Hi All, I am using unix's sendmail utility to send mails with attacments. I am using the uuencode command for attachments (zip). When i send the mails to some account which is configured in the MS outook it opens/unzip the attachments with no problem. But the same attachments seems to be... (3 Replies)
Discussion started by: manojram
3 Replies

7. Linux

acroread command giving error

Hi, When I run the command acroread it is giving error ERROR: Cannot find installation directory. When I look at /usr/local/Adobe/Acrobat7.0/bin/ an exicutable file named acroread is there. When i run ./acroread from that directory it is working . What can i do so that I can give... (3 Replies)
Discussion started by: iamjayanth
3 Replies

8. UNIX for Dummies Questions & Answers

Last Command not giving year

Hi All, i want the last login details along with year. i tried below command but not giving me the year of last login. last <$Userid> | head -1 i heard that if it is current year then it wont display the year else it will display the year. is it so? if yes then , is there any way of... (1 Reply)
Discussion started by: ani_rvce
1 Replies

9. Shell Programming and Scripting

Last Command not giving year

Hi All, i want the last login details along with year. i tried below command but not giving me the year of last login. last <$Userid> | head -1 i heard that if it is current year then it wont display the year else it will display the year. is it so? if yes then , is there any way of... (1 Reply)
Discussion started by: ani_rvce
1 Replies

10. Solaris

^p not giving command line history.

I am used to using "set -o emacs" and then using "CNTL-P" for getting previous commands in solaris but on one host it does not work and instead just makes a DONG!! # ksh # set -o emacs # ls # ^p Can anyone offer guidance as to why this is? Thank you my friends. akbar (0 Replies)
Discussion started by: akbar
0 Replies
Login or Register to Ask a Question