|
|
| Next: cron help with cygwin |
| Author |
Message |
Colin Finck External

Since: Apr 18, 2006 Posts: 4
|
Posted: Fri May 05, 2006 7:44 am Post subject: How to join directories? Archived from groups: comp>os>linux>misc (more info?) |
|
|
Hello,
I have some directories (dir_1, dir_2, ...) with almost the same
directory structure here. I also have another directory (dir_a), which
has also almost the same directory structure, but it contains files,
which are needed in the other directories.
I know that Linux has symbolic links for that to save disk space, so I
don't need to copy all the files. I could now create symbolic links for
every file of dir_a in the directories dir_1, dir_2, ...
But is there also a command for joining the directory content of dir_a
directly without creating all these links manually? If not, with which
commands or shell script commands can I create the needed links most
easily?
Best regards,
Colin Finck |
|
| Back to top |
|
 |
Dan Espen External

Since: Jan 16, 2006 Posts: 496
|
Posted: Fri May 05, 2006 11:49 am Post subject: Re: How to join directories? [Login to view extended thread Info.] Archived from groups: per prev. post (more info?) |
|
|
"Colin Finck" <ColinFinck.RemoveThis@compuserve.de> writes:
> Hello,
>
> I have some directories (dir_1, dir_2, ...) with almost the same
> directory structure here. I also have another directory (dir_a), which
> has also almost the same directory structure, but it contains files,
> which are needed in the other directories.
>
> I know that Linux has symbolic links for that to save disk space, so I
> don't need to copy all the files. I could now create symbolic links for
> every file of dir_a in the directories dir_1, dir_2, ...
>
> But is there also a command for joining the directory content of dir_a
> directly without creating all these links manually? If not, with which
> commands or shell script commands can I create the needed links most
> easily?
You can link one directory to another but I don't think that's what
you want. To link each file, it's pretty easy to write a script
but the lndir command in /usr/X11R6/bin will probably do what you want. |
|
| Back to top |
|
 |
Chris Davies External

Since: Apr 13, 2004 Posts: 284
|
Posted: Fri May 05, 2006 5:01 pm Post subject: Re: How to join directories? [Login to view extended thread Info.] Archived from groups: per prev. post (more info?) |
|
|
Colin Finck <ColinFinck.TakeThisOut@compuserve.de> wrote:
> I have some directories (dir_1, dir_2, ...) with almost the same
> directory structure here. I also have another directory (dir_a), which
> has also almost the same directory structure, but it contains files,
> which are needed in the other directories.
So you have three similar directory trees, and you want to duplicate all
files from dir_a into dir_1 and dir_2?
> I know that Linux has symbolic links for that to save disk space, so I
> don't need to copy all the files. I could now create symbolic links for
> every file of dir_a in the directories dir_1, dir_2, ...
OK
> But is there also a command for joining the directory content of dir_a
> directly without creating all these links manually? If not, with which
> commands or shell script commands can I create the needed links most
> easily?
It depends on how similar your directory trees really are. The following
two commands will use hard links (not symbolic links) to populate dir_1
and dir_2 from the contents of dir_a. Is this what you wanted?
cd dir_a && find . | cpio -pld /path/to/dir_1
cd dir_a && find . | cpio -pld /path/to/dir_2
Chris |
|
| Back to top |
|
 |
Colin Finck External

Since: Apr 18, 2006 Posts: 4
|
Posted: Sat May 06, 2006 1:47 am Post subject: Re: How to join directories? [Login to view extended thread Info.] Archived from groups: per prev. post (more info?) |
|
|
Thanks! That is exactly what I wanted.
Best regards,
Colin Finck |
|
| Back to top |
|
 |
Chris Davies External

Since: Apr 13, 2004 Posts: 284
|
Posted: Sun May 07, 2006 3:34 pm Post subject: Re: How to join directories? [Login to view extended thread Info.] Archived from groups: per prev. post (more info?) |
|
|
Colin Finck <ColinFinck.DeleteThis@compuserve.de> wrote:
> Thanks! That is exactly what I wanted.
Er, where's your context? /What/ is exactly what you wanted?
Chris |
|
| Back to top |
|
 |
Dan C External

Since: Jan 08, 2005 Posts: 1094
|
Posted: Sun May 07, 2006 3:34 pm Post subject: Re: How to join directories? [Login to view extended thread Info.] Archived from groups: per prev. post (more info?) |
|
|
On Sun, 07 May 2006 15:34:40 +0100, Chris Davies wrote:
> Colin Finck <ColinFinck.RemoveThis@compuserve.de> wrote:
>> Thanks! That is exactly what I wanted.
> Er, where's your context? /What/ is exactly what you wanted?
He's yet another Google Groups poster. Those morons don't even know the
meaning of the word "context", much less how to properly post to Usenet.
Best approach is to ignore all posters from GG.
--
If you're not on the edge, you're taking up too much space.
Linux Registered User #327951 |
|
| Back to top |
|
 |
Chris Davies External

Since: Apr 13, 2004 Posts: 284
|
Posted: Sun May 07, 2006 6:17 pm Post subject: Re: How to join directories? [Login to view extended thread Info.] Archived from groups: per prev. post (more info?) |
|
|
On Sun, 07 May 2006 15:34:40 +0100, Chris Davies wrote:
> Er, where's your context? [...]
Dan C <youmustbejoking DeleteThis @invalid.lan> wrote:
> He's yet another Google Groups poster. Those morons don't even know the
> meaning of the word "context", much less how to properly post to Usenet.
I don't believe that's necessarily their fault; more a consequence of
the GG interface.
> Best approach is to ignore all posters from GG.
I (almost) always give each one a chance. How else does one learn?
Chris |
|
| Back to top |
|
 |
Aragorn External

Since: Aug 07, 2005 Posts: 1389
|
Posted: Sun May 07, 2006 10:22 pm Post subject: Re: How to join directories? [Login to view extended thread Info.] Archived from groups: per prev. post (more info?) |
|
|
On Sunday 07 May 2006 22:11, Harold Stevens stood up and spoke the
following words to the masses in /comp.os.linux.misc...:/
> In <3mm1j3-k47.ln1 RemoveThis @news.roaima.co.uk> Chris Davies:
>
> [Snip...]
>
>> I (almost) always give each one a chance. How else does one learn?
>
> <RANT>
>
> [...]
>
> YO, GOOGLE: quote the referenced article in replies, by default, and
> urge posters to trim for relevant context. As per netiquette, years
> now.
>
> [...]
>
> </RANT>
I would personally add to that list that Google should inform its Google
Groups users that Usenet is *not* some forum that exists *on* Google's
network, but something that pre-exists Google by a couple of thousands
years - okay, I'll take back a few hundred - and to which *they*
are *only* offering a (badly broken) posting interface.
I've said it before and I'll say it again: Google's current approach and
Microsoft's enduring approach is to dumb the users down.
Whereas it was already quite hard years ago to tell the newbies *not* to
reboot their computer all the time just because that happens to be the
policy in Microsoft Windows, it is now virtually impossible to put some
sense or knowledge into the newbie's brain.
<sarcasm overload>
Directories don't exist anymore - they are "folders" now. <cringe>
Usenet is no longer an NNTP network - it's a forum on Google Groups.
GNU/Linux is no longer a Free Software UNIX clone - it's a /"freeware"/
Windows replacement. All PC's need constant rebooting. Every PC needs
a firewall, an anti-virus program and an anti-spyware tool. /wine/
must be installed, so that they can run Windows applications, because
they don't want to use the native GNU/Linux or UNIX software. Hardware
designed for Windows which doesn't run on GNU/Linux is GNU/Linux's
fault. GNU/Linux should become more like Windows. Oh, and let's not
forget that replies must be typed above the questions... :-/
</sarcasm overload>
It's a process called evolution. Only with the species called /homo/
/sapiens,/ evolution appears to be headed towards the shrinking of the
brain... :-/
Sad... _Very_ sad!
--
With kind regards,
*Aragorn*
(Registered GNU/Linux user #223157) |
|
| Back to top |
|
 |
|
|
|
You can post new topics in this forum You can reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
| |
|
|