LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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 05-29-2008, 11:36 PM   #1
jkeertir
Member
 
Registered: Mar 2008
Posts: 70

Rep: Reputation: 15
copy command


Dear ALL,

I want to know if it is possible to copy whole directory to other directory using inode.


I also want to create a folder with name as "NEw Folder" in /mnt/ide4 directory.I tried a lot but could not create that folder

Pleae help me to solve these issues.

With Regards,
Keerti
 
Old 05-29-2008, 11:53 PM   #2
charlie0313
Member
 
Registered: Jan 2008
Location: Dunn Loring, VA
Distribution: Slackware 12.0, Ubuntu 8.04
Posts: 47

Rep: Reputation: 15
I don't know about your first question but: "mkdir NEw\ Folder" should solve the second. You have to but a backslash before spaces. If that doesn't work than I guess it has to do with what ide4 is formated as?
 
Old 05-30-2008, 12:03 AM   #3
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,063

Rep: Reputation: 381Reputation: 381Reputation: 381Reputation: 381
Quote:
Originally Posted by jkeertir View Post
Dear ALL,

I want to know if it is possible to copy whole directory to other directory using inode.
Erm? Try to define a bit better what you want to achieve. To copy directories recursively you would use "cp -r"

Quote:
I also want to create a folder with name as "NEw Folder" in /mnt/ide4 directory.I tried a lot but could not create that folder
First, make sure that something is mounted into that dir. Second, make sure it's mounted with read AND write permissions. Then use mkdir correctly by quoting the name of the directory.

Code:
mkdir "/mnt/ide4/New dir"
 
Old 05-30-2008, 12:26 AM   #4
eggixyz
Member
 
Registered: Apr 2008
Posts: 310

Rep: Reputation: 30
Hey There,

You can copy using the inode by doing this (at least, this is one way)

Quote:
-bash-3.2$ ls -i
567509 a
-bash-3.2$ find . -inum 567509 -exec cp {} b \;
-bash-3.2$ ls -i
567509 a 567510 b
Note that it would be a major hassle trying to find a free inode and then copy to it. cp should take care of that part for you.

Also, in case I misunderstood you, you can't copy an inode across partitions since all of them will most certainly have duplicate inode numbers (for instance: inode 999 on /var might include all the information about the BOB file, except it's name, but inode 999 on /usr - assuming separate mounts - may point to an entirely different file, which you would overwrite.

Hope that helps

, Mike
 
  


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
Copy command yusufs Linux - General 3 10-28-2007 05:16 AM
Copy command yusufs Linux - Newbie 3 10-25-2007 06:58 AM
copy command munna_dude Linux - General 19 06-21-2007 07:57 AM
Help on copy command Nishant Desai Linux - Software 3 09-20-2006 03:50 AM
Copy Command rlkiddjr Linux - General 2 05-07-2002 02:37 PM


All times are GMT -5. The time now is 04:45 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration