Bash to download specific files and save in two folders


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Bash to download specific files and save in two folders
# 8  
Old 06-01-2015
I will check on the site in question as far as the wget login. If I wanted to append yesterdays timestamp to each file would the below work?

Code:
U1=file1_`date -dy +%Y-%m-%d`.bam
U2=file2_`date -dy +%Y-%m-%d`.bam
U3=file3_`date -dy +%Y-%m-%d`.bam

Thank you Smilie.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Find files in specific folders

Hi Team, I am new to the linux commands and I really need help . I would be really thankful if I can get some inputs. I have below folders in the path "/home/temp" 20170428 20170427 20170429 changes tempI need to get the files generated in the last 15 mins in all the above folders... (4 Replies)
Discussion started by: JackJinu
4 Replies

2. Shell Programming and Scripting

Bash directory loop, but only choose those folders with specific word in it

Hello, how in bash i can get directory loop, but only choose those folders with specific word in it, so it will only echo those with specific word #!/bin/bash for filename in /home/test/* do if ; then echo $filename; fithx! (4 Replies)
Discussion started by: ZerO13
4 Replies

3. Shell Programming and Scripting

Bash to list all folders in a specific directory

The below bash is trying to list the folders in a specific directory. It seems close but adds the path to the filename, which basename could strip off I think, but not sure why it writes the text file created? This list of folders in the directory will be used later, but needs to only be the... (5 Replies)
Discussion started by: cmccabe
5 Replies

4. Shell Programming and Scripting

Bash to move specific files from folders in find file

I have a directory /home/cmccabe/nfs/exportedReports that contains multiple folders in it. The find writes the name of each folder to out.txt. A new directory is then created in a new location /home/cmccabe/Desktop/NGS/API, named with the date. What I am trying to do, unsuccessfully at the moment,... (7 Replies)
Discussion started by: cmccabe
7 Replies

5. Shell Programming and Scripting

Bash to tell download where specific files are stored

The bash below will download all the files in download to /home/Desktop/folder. That works great, but within /home/Desktop/folder there are several folders bam, other, and vcf, is there a way to specify by extention in the download file where to download it to? For example, all .pdf and .zip... (2 Replies)
Discussion started by: cmccabe
2 Replies

6. Shell Programming and Scripting

How to delete all the files and folders inside all the directories except some specific directory?

hi, i have a requirement to delete all the files from all the directories except some specific directories like archive and log. for example: there are following directories such as A B C D Archive E Log F which contains some sub directories and files. The requirement is to delete all the... (7 Replies)
Discussion started by: Little
7 Replies

7. Shell Programming and Scripting

FAQ how to download multiple specific files via command line

Hi, This evening i would like to download multiple pcap captures files in the wireshark wiki sites. My aim is to download the capture files .pcap .cap and etc on the wireshark site SampleCaptures - The Wireshark Wiki. i already used wget, lynx, htget but still their problem downloading..it seems... (1 Reply)
Discussion started by: jao_madn
1 Replies

8. UNIX for Dummies Questions & Answers

Monitoring specific files and folders

I want a mechanism to monitor a folder full of files that are sensitive. I want to log all accesses,modifications and changes to any file within the folder in a log file which should give me access/modify/change times,the user id of the process which tried and the pid. Even some idea of what to... (1 Reply)
Discussion started by: Vivek788
1 Replies

9. Shell Programming and Scripting

Copying specific files from remote m/c to specific folders

Hi All, I am trying to rsync some of the latest files from remote m/c to my local linux box. Folder structure in my remote m/c looks like this /pub/Nightly/Package/ROLL/WIN /pub/Nightly/Package/SOLL/sol /pub/Nightly/Package/SOLL/linux Each of the folder contains gzip files which on daily... (0 Replies)
Discussion started by: jhoomsharabi
0 Replies

10. Shell Programming and Scripting

decompressed files to specific folders

Hi all, I have a script below which meant to decompress *.tr.gz to allocated folder. e.g. hello.tar.gz should be decompress to a subdirectory called hello and all the files should be in hello subdirectory. How do i do it? Am i missing anything? Condition: there are existing tar.gz in teh... (3 Replies)
Discussion started by: c00kie88
3 Replies
Login or Register to Ask a Question
zsync(1)							   File Transfer							  zsync(1)

NAME
zsync - Partial/differential file download client over HTTP SYNTAX
zsync [ -u url ] [ -i inputfile ] [ -o outputfile ] [ { -s | -q } ] [ -k file.zsync ] [ -A hostname=username:password ] { filename | url } zsync -V DESCRIPTION
Downloads a file over HTTP. zsync uses a control file to determine whether any blocks in the file are already known to the downloader, and only downloads the new blocks. Either a filename or a URL can be given on the command line - this is the path of the control file for the download, which normally has the name of the actual file to downlaod with .zsync appended. (To create this .zsync file you have to have a copy of the target file, so this file should be generated by the person providing the download). zsync downloads to your current directory. It looks for any file in the directory of the same name as the file to download. If it finds one, it assumes that this is an earlier or incomplete version of the new file to download, and scans this file for any blocks that it can use to build the target file. (It also looks for a file of the same name with .part appended, so it will automatically find previously interrupted zsync downloads and reuse the data already downloaded. If you know that the local file to use as input has a different name, you must use -i) zsync retrieves the rest of the target file over HTTP. Once the download is finished, the old version (if the new file wants the same name) is moved aside (a .zs-old extension is appended). The modification time of the file is set to be the same as the remote source file (if specified in the .zsync). OPTIONS
-A hostname=username:password Specifies a username and password to be used with the given hostname. -A can be used multiple times (with different hostnames), in cases where e.g. the .zsync file is on a different server from the download, or there are multiple download servers (there could be different auth details for different servers - and zsync never assumes that your password should be sent to a server other than the one named - otherwise redirects would be dangerous!). -i inputfile Specifies (extra) input files. inputfile is scanned to identify blocks in common with the target file and zsync uses any blocks found. Can be used multiple times. -k file.zsync Indicates that zsync should save the zsync file that it downloads, with the given filename. If that file already exists, then zsync will make a conditional request to the web server, such that it will only download it again if the server's copy is newer. zsync will append .part to the filename for storing it while it is downloading, and will only overwrite the main file once the download is done - and if the download is interrupted, it will resume using the data in the .part file. -o outputfile Override the default output file name. -q Suppress the progress bar, download rate and ETA display. -s Deprecated synonym for -q. -u url This specifies the referring URL. If you have a .zsync file locally (if you downloaded it separately, with wget, say) and the .zsync file contains a relative URL, you need to specify where you got the .zsync file from so that zsync knows which server and path to use for the rest of the download (this is analogous to adding a <base href="..."> to a downloaded web page to make the links work). -V Prints the version of zsync. FILES
ENVIRONMENT VARIABLES
http_proxy Should be the [http://]hostname:port for your web proxy, if one is required to access the target web server(s). EXAMPLES
zsync -i /var/lib/apt/lists/server.debian.org_debian_dists_etch_main_binary-i386_Packages http://zsync.moria.org.uk/s/etch/Packages.zsync AUTHORS
Colin Phipps <cph@moria.org.uk> SEE ALSO
zsyncmake(1) Colin Phipps 0.6.2 zsync(1)