Re: wget and resulting filenames with mirror option

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



Joseph L. Casale wrote, On 07/28/2010 04:26 PM:
> I am trying to mirror a directory using wget and the resulting files as
> expected are taking the name of the string in the url after the last "/".
> 
> Anyone know a way around this? I am using the mirror option so I don't
> have to keep track of what to get making it simple.
> 
> Thanks!
> jlc

I am having a bit of trouble parsing what you wrote, but I think you are saying you are issuing
something like:
wget --mirror http://example.com/subdir1/subdir2/fileiwant
and getting at your location
./fileiwant
which is a little confusing, because I would have expected you to get (with just the --mirror option):
./example.com/subdir1/subdir2/fileiwant

please give an example command and output received and desired.

to get ./fileiwant from my example url above I think you would have to do:
wget --mirror ---cut-dirs=2 -no-host-directories \
	http://example.com/subdir1/subdir2/fileiwant

-- 
Todd Denniston
Crane Division, Naval Surface Warfare Center (NSWC Crane)
Harnessing the Power of Technology for the Warfighter
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos


[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux