[ILUG] Linux question:
colm at tuatha.org
Tue Jan 16 23:56:26 GMT 2007
On 16/01/07, ChipEast at aol.com <ChipEast at aol.com> wrote:
> I found your very helpful posting:
> and had a couple of questions..... if you don't mind the intrusion
Well, I'm not Robert, but you CC'd ILUG, so I'll try to help...
[...] As a test, I ran the first line on the Linux box (Ubuntu 6.10, working
> other than these file issues), then modified the 2nd line, the one for the
> sending the files, to look like this:
> tar jlcvPpf - /Users/chipeast/Desktop/EAST_NJNG13jan07/ >
Ok, this is where your first problem (the full directory structure being
created) comes from; the command above creates an archive of the directory
specified, but tells "tar" to use the full directory name, starting at /
Change this to:
tar cvf - EAST_NJNG13jan07 --exclude '.*' > /dev/tcp/192.168.1.16/6666
We're doing two things here - first of all using the relative pathname to
the EAST_NJNG13jan07 directory so that the full directory tree doesn't get
created, and secondly adding an exclude to prevent files beginning with a
dot from being included; this should eliminate the OS X metadata files from
being transferred. I've also removed the compression ("j") option from the
tar, as JPEG files don't really compress well enough to warrant the CPU
If you have more than one directory to be transferred, you can list several
on the "tar" command line above, or even use a wildcard - although if there
are very many, the wildcard might expand to more than the capacity of the
command line. Experimentation will reveal the best thing to do.
On the server, do:
nc -l -p 6666 | tar xvf -
That tells it to listen on the socket and pipe the results directly into the
tar expand command.
Should do everything you need.
Colm Buckley / colm at tuatha.org / +353 87 2469146
More information about the ILUG