03-27-2009
From the wget man page:
Quote:
-P prefix
--directory-prefix=prefix
Set directory prefix to prefix. The directory prefix is the directory where all other files and subdirectories will be saved to, i.e. the top of the retrieval tree. The default is . (the current directory).
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have noticed a lot of expensive books appearing
online so I have decided to copy them to CD.
I was going to write a program in java to do this,
but remembered that wget GNU program some of
you guys were talking about.
Instead of spending two hours or so writing a
program to do this.... (1 Reply)
Discussion started by: photon
1 Replies
2. Shell Programming and Scripting
i am trying to ftp files/dirs with wget. i am having an issue where the path always takes me to my home dir even when i specify something else. For example:
wget -m ftp://USER:PASS@IP_ADDRESS/Path/on/remote/box
...but if that path on the remote box isn't in my home dir it doesn't change to... (0 Replies)
Discussion started by: djembeplayer
0 Replies
3. Shell Programming and Scripting
Hi,
i need temperature hourly from a web page
Im using wget to get the web page. I would like to save the page downloaded in a file called page. I check the file everytime i run the wget function but its not saving but instead creates a wx.php file....Each time i run it...a new wx.php file is... (2 Replies)
Discussion started by: vadharah
2 Replies
4. Shell Programming and Scripting
can someone please help in understanding this shell script?
wget --progress=dot:mega --cut-dirs=4 -r -c -nH -np --reject index.html*,icons/*.gif \
http://*****.oz.xxxxx.com:<portnum>/omcsm/releases/dew/${UPGRADE_VERSION}/ (1 Reply)
Discussion started by: dnam9917
1 Replies
5. UNIX for Dummies Questions & Answers
...... (1 Reply)
Discussion started by: hoo
1 Replies
6. Shell Programming and Scripting
Hi Friends,
I have an url like this
https://www.unix.com/help/
In this help directory, I have more than 300 directories which contains file or files.
So, the 300 directories are like this
http://unix.com/help/
dir1
file1
dir2
file2
dir3
file3_1
file3_2... (4 Replies)
Discussion started by: jacobs.smith
4 Replies
7. Red Hat
If I run the following command
wget -r --no-parent --reject "index.html*" 10.11.12.13/backups/
A local directory named 10.11.12.13/backups with the content of web site data is created.
What I want to do is have the data placed in a local directory called $HOME/backups.
Thanks for... (1 Reply)
Discussion started by: popeye
1 Replies
8. UNIX for Dummies Questions & Answers
How can I download only *.zip and *.rar files from a website <index> who has multiple directories in root parent directory?
I need wget to crawl every directory and download only zip and rar files. Is there anyway I could do it? (7 Replies)
Discussion started by: galford
7 Replies
9. Shell Programming and Scripting
Can wget be used to goto a site and piped into a .gz extrated command?
wget ftp://ftp.ncbi.nlm.nih.gov/pub/clinvar/vcf_GRCh37 | gunzip -d clinvar_20150603.vcf.gz (1 Reply)
Discussion started by: cmccabe
1 Replies
10. Shell Programming and Scripting
Hi,
I need to download a zip file from my the below US govt link.
https://www.sam.gov/SAMPortal/extractfiledownload?role=WW&version=SAM&filename=SAM_PUBLIC_MONTHLY_20160207.ZIP
I only have wget utility installed on the server.
When I use the below command, I am getting error 403... (2 Replies)
Discussion started by: Prasannag87
2 Replies
LEARN ABOUT ULTRIX
mktemp
mktemp(1) General Commands Manual mktemp(1)
Name
mktemp - make a name for a temporary file
Syntax
mktemp [ -c ] [ -d directory_name ] [ -p prefix ]
Description
The command makes a name for the pathname of a temporary file and writes that name to standard output. The name will not duplicate that of
an existing file. The command does not create a new file. The file named must actually be created before can generate a new filename.
Subsequent calls to will only generate a new file name if all previously generated file names have been created by the user and still
exist. Error messages are written to standard error.
The directory_name generated by is the concatenation of a directory name, a slash (/), a file prefix, a dot (.), a four digit number and a
unique character.
The directory name is chosen as follows:
(1) If the -d option is specified, directory_name is used.
(2) Otherwise, if the TMPDIR environment variable is set and a string that would yield a unique name can be obtained using the value of
that variable as a directory name, this value is used.
(3) Otherwise, is used.
The prefix is chosen as follows:
(1) If the -p option is specified, prefix is used.
(2) Otherwise, if the LOGNAME environment variable is set, it is used as the prefix.
(3) Otherwise, the user's login name is used.
Options
-c Causes to attempt to create a regular file using the generated (or created) name string. If file creation is successful, a zero
length file is created with access permissions derived from the process's file mode creation mask, see No attempt is made to
create a file if the length of the generated (or created) name string exceeds 1023 characters. It is the user's responsibility
to remove files created by use of this option.
-d directory_name
Causes directory_name to be used as the directory portion of the pathname. In this case, directory_name is used instead of
TMPDIR and
-p prefix Causes the string prefix to be used as the file's prefix. It is used instead of LOGNAM and the user's login name. If the pre-
fix is longer the 249 characters, it will be silently truncated to that length before the concatenation of the suffix.
Environmental Variables
LOGNAME When the -p prefix option is not specified, the value of this variable is used as the prefix of the filename, if it exists.
TMPDIR When the -d directory_name option is not specified, the value of this variable is used instead of
Restrictions
If the user does not have write permission in the directory specified, and error message is reported and is used in its place. The entire
path name can not exceed 1023 characters, and the temporary file name can not exceed 255 characters. If the generated file name is too long
it is truncated to fit before the suffix is added.
See Also
mktemp(1)