Aria2c to download and extract. tar.bz2


 
Thread Tools Search this Thread
Top Forums Programming Aria2c to download and extract. tar.bz2
# 1  
Old 09-28-2016
Aria2c to download and extract. tar.bz2

I am using aria2c to download a .tar.bz2 and trying to extract it in the same command. I can download the file but not extract it. I can also manually extract the tar.bz2., but not in the same command. Thank you Smilie.

Code:
aria2c -x8 -l log.txt -c -d /xx/xx/xxx --use-head=true --http-user "<user>"  --http-passwd >password> http://xxx.xx/xxx/xx/xxx/xxxx/xx/xxx.tar.bz2 | tar xj
bzip2: (stdin) is not a bzip2 file.

---------- Post updated at 05:12 PM ---------- Previous update was at 05:12 PM ----------

aria2c
# 2  
Old 09-28-2016
It's not outputting to stdout at all since it wasn't asked to. bzip is complaining because it gets whatever text aria2c prints fed into it instead of the file.

Looks like the closest it can manage is --stderr=true -o /dev/stdout The --stderr=true prevents it from dumping informational text into stdout.
# 3  
Old 09-28-2016
So try:

Code:
aria2c -x8 -l log.txt -c -d /xx/xx/xxx --use-head=true --stderr=true -o /dev/stdout --http-user "<user>" --http-passwd >password> http://xxx.xx/xxx/xx/xxx/xxxx/xx/xxx.tar.bz2 | tar xj

or did I misunderstand? Thank you Smilie.
# 4  
Old 09-28-2016
Try that, yes.
This User Gave Thanks to Corona688 For This Post:
# 5  
Old 09-29-2016
I get: though the man says --stderr=true is an option.

Code:
aria2c --version
aria2 version 1.18.1

though looking at the documentation the option is from 1.27.1.

What is the best way to upgrade to the newest version of aria2c, use apt get or am I better off with the actual tar.gz. I am using ubuntu 14.04. Thank you Smilie.

Code:
aria2c -x8 -l log.txt -c -d /home/cmccabe/Desktop/NGS/API --use-head=true --stderr=true -o /dev/stdout --http-user "<user>"  --http-passwd <password> http://xxx.xxx/xx/xx/xxx/xxx/xxx.tar.bz2 | tar xj
aria2c: unrecognized option '--stderr=true'

# 6  
Old 09-29-2016
To be honest, I'm not sure if the option will even work as I intended it to. aria2c does not seem designed with stdout use in mind.
This User Gave Thanks to Corona688 For This Post:
# 7  
Old 09-29-2016
I will look into curl or wget alternatives. Can you recommend one that would download and ext6ract a tar.gz. The site is password protected as well. Thank you Smilie.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Speed up extraction od tar.bz2 files using bash

The below bash will untar each tar.bz2 folder in the directory, then remove the tar.bz2. Each of the tar.bz2 folders ranges from 40-75GB and currently takes ~2 hours to extract. Is there a way to speed up the extraction process? I am using a xeon processor with 12 cores. Thank you :). ... (7 Replies)
Discussion started by: cmccabe
7 Replies

2. Shell Programming and Scripting

Bash not removing all .tar.bz2 files after extracting

In the bash below each .tar.bz2 (usually 2) are extracted and then the original .tar.bz2 is removed. However, only one (presumably the first extracted) is being removed, however both are extracted. I am not sure why this is? Thank you :). tar.bz2 folders in /home/cmccabe/Desktop/NGS/API ... (3 Replies)
Discussion started by: cmccabe
3 Replies

3. Programming

Aria2c will not exit after sucessful download

I am using the below aria2c command to call an API that downloads a file to a directory. Though the process completes and I get "download complete"... aria2c does not exit to the command line, I have to hit enter to get the command line. I am not sure what is wrong. Am I missing something in... (0 Replies)
Discussion started by: cmccabe
0 Replies

4. Ubuntu

Error messages while extracting tar.bz2 in Ubuntu

while extracting a tar.bz2 file using the command tar xjf git.tar.bz2 I received error messages that shows Cannot hard link to and Cannot create symlink to error messages what will be the reason for those error messages. (4 Replies)
Discussion started by: saravana krishn
4 Replies

5. UNIX and Linux Applications

Download firefox-19.0.2.tar.bz2

Does anyone know a reliable source to download firefox-19.0.2.tar.bz2 from? I would think you be able to download from firefox or mozilla somewhere. I haven't gotten anything useful from my google searches. (2 Replies)
Discussion started by: cokedude
2 Replies

6. Shell Programming and Scripting

Put one tar.bz2 file to another tar.bz2

Hi experts, I have two tar.bz2 file,: a.tar.bz2 and b.tar.bz2 I want to put a.tar.bz2 in to b.tar.bz2 eg: b.tar.bz2 only have one file named "b.c" contained I want it contain "b.c and a.tar.bz2" I don't want to decompress the b.tar.bz2 to achieve this, I try with "cat a.tar.bz2 >>... (1 Reply)
Discussion started by: yanglei_fage
1 Replies

7. Shell Programming and Scripting

How to unpack and install .tar.bz2 library ?

Hi, I am trying to unpack and install .tar.bz2 library. I was told to cd / and than tar -jxvf /source-of-library-file?...tar.bz2 to get files unpacked and installed into / Darius $ pwd / $ $ tar -jxvf /tmp/local/root/ncurses-dev-addon.tar.bz2 ncurses-dev-addon/... (3 Replies)
Discussion started by: jack2
3 Replies

8. Shell Programming and Scripting

compare two tar.bz2

Hello, I am using a bash script to archive directories of text files located in ${root}: tar cf ${root}.tar ${root}* bzip2 ${root}.tar I'd like to compare the newly produced archive two.tar.bz2 with the second latest one.tar.bz2. cmp one.tar.bz2 two.tar.bz2 returns one.tar.bz2 two.tar.bz2... (2 Replies)
Discussion started by: JCR
2 Replies

9. UNIX for Advanced & Expert Users

extracting from tar.bz2

hi could any body tell me how to extract .tar.bz2 files i tried using tar but in vain. i found bzip2 in googling but i could not find it on machine unix tru64 please suggest. (1 Reply)
Discussion started by: Raom
1 Replies
Login or Register to Ask a Question