LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 03-15-2005, 12:31 AM   #1
gardenair
Member
 
Registered: Oct 2004
Location: LH
Posts: 648

Rep: Reputation: 45
guidence for cp


hi
I need help about cp (Coppy command). I made a subdirectory i.e mydir
I made a file in my current woring diretory & give it full permission i.e

$ ls -l /mysub

-rwx
At the prompt i write

$ cp file1 /mysub
cannot create regular file '/mysub'ermission denied.

Plz guide me taht how can i copt the file in the subdirectory i.e mysub.
Thanks
 
Old 03-15-2005, 12:40 AM   #2
chbin
Member
 
Registered: Mar 2005
Distribution: slackware-current
Posts: 379

Rep: Reputation: 31
umm, coud you rewrite that and make it clearer as to what you are trying to do.
 
Old 03-15-2005, 12:57 AM   #3
gardenair
Member
 
Registered: Oct 2004
Location: LH
Posts: 648

Original Poster
Rep: Reputation: 45
so how can i write a simple cp command to copy file in the same folder or other .

Also enlight on Link file .What are they & what are its purpose?
 
Old 03-15-2005, 01:02 AM   #4
alunduil
Member
 
Registered: Feb 2005
Location: San Antonio, TX
Distribution: Gentoo
Posts: 684

Rep: Reputation: 62
Have you had a look at a few of the man pages yet? Ones you may be interested in are chmod, ln, and cp.

Hope this helps,

Alunduil
 
Old 03-15-2005, 01:21 AM   #5
chbin
Member
 
Registered: Mar 2005
Distribution: slackware-current
Posts: 379

Rep: Reputation: 31
user@localhost:~$ cd /home/slack
user@localhost:~$ mkdir abc
user@localhost:~$ touch file{1,2,3}
user@localhost:~$ ls
abc/ file1 file2 file3
user@localhost:~$ cp file* abc/
user@localhost:~$ ls
abc/ file1 file2 file3
user@localhost:~$ ls abc/
file1 file2 file3
user@localhost:~$ cp -R abc/ def
user@localhost:~$ ls def/
file1 file2 file3


Read the man pages

$ man ls
$ man cp
$ man mv
 
Old 03-15-2005, 01:29 AM   #6
gardenair
Member
 
Registered: Oct 2004
Location: LH
Posts: 648

Original Poster
Rep: Reputation: 45
"chbin" that is a greate help for me. iam extremely thankfull for kind guidence. At the moment it is not possibel to do it in my terminal because iam using win2000.

Ok if i want to copy the same file in the same folder then what should be the currect syntex. Plz also addon it.

About man cp..i had already checked it but unable to understand it .Again i shall try it

Again bundle of thanks for the help
 
Old 03-15-2005, 01:45 AM   #7
chbin
Member
 
Registered: Mar 2005
Distribution: slackware-current
Posts: 379

Rep: Reputation: 31
to copy a folder that has stuff in it you have to include the -r option... copy recurisevly
to delete a folder with stuff in it use rm -r ... delete recursively


There are lots of unix tutorials are all over the net. I recommend you read one for beginners.


http://www.linux.org/lessons/beginner/toc.html
 
Old 03-15-2005, 01:58 AM   #8
gardenair
Member
 
Registered: Oct 2004
Location: LH
Posts: 648

Original Poster
Rep: Reputation: 45
Again "chbin"for the help. It is really a good site . I shall study it .
One thing is confusing since iam using Linux that what is Inode & Link file?

A link file is a file copy of the same file so that the other user can access it on the other terminal . So it means file having one address with two names of files.

If u know more about it .Guide me .

Thanks ..Bundle of thanks for your good help & guidence for a new Linux user.
 
Old 03-15-2005, 02:09 AM   #9
chbin
Member
 
Registered: Mar 2005
Distribution: slackware-current
Posts: 379

Rep: Reputation: 31
A link file is just a file that points to another.

user@localhost:~$ ls
a
user@localhost:~$ ln -s a linky
user@localhost:~$ ls -l
total 4
-rw-r--r-- 1 user users 826 2005-03-15 02:06 a
lrwxrwxrwx 1 user users 1 2005-03-15 02:06 linky -> a
 
Old 03-15-2005, 02:15 AM   #10
gardenair
Member
 
Registered: Oct 2004
Location: LH
Posts: 648

Original Poster
Rep: Reputation: 45
"chbin" It is really a good help.


thanks once again .
 
  


Reply


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
Linux newbie lost in need of guidence... if you have some time to spare please look. Lechium Linux - Newbie 6 12-03-2006 04:56 PM
Linux distro?????? need guidence Igor007 Linux - Newbie 13 09-16-2004 12:29 PM
new user guidence. Phebes Linux - Newbie 8 09-05-2004 02:04 PM
Need Some Guidence [303] Linux - Newbie 4 05-04-2004 09:04 PM
just need a little guidence please johncla Linux - General 1 04-17-2002 07:23 PM

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

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