how to run tar xzc /tmp command in windows - linux

I am trying to run the following command in cmd:
curl https://data.keithito.com/data/speech/tacotron-20180906.tar.gz | tar xzC /tmp
But I get an error message:
tar: Error opening archive: Faile d to op%en '\\. \taTpe0'o
tal % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 74.5M 0 16073 0 0 14172 0 1:31:54 0:00:01 1:31:53 14198
curl: (23) Failure writing output to destination
How can you write a command identical to this in cmd and not in linux?

Related

Transfrer file from raspberry pi to file server on same network with python

I have a raspberry pi taking pictures, that is connected to the LAN. I want to automatically upload each picture file to a samba ubuntu file server I have on my network, so I can easily view them.
I have tried to get the command "curl" with no luck. (which I would run with subprocess in python)
This is my command that doesn't work (trying to copy test.png to destination directory):
curl -T "/home/pi/Desktop/test.png" "smb://10.51.112.128/home/thomas/thomasdrive/destination" -u thomas:87651234
I get:
% Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 curl: (7) Couldn't connect to server
I've been searching the internet for a solution, but nothing I try seems to work

Cannot install rvm to HOME path on arch linux

My problem is that I can't install RVM to $HOME path. My OS is Arch Linux.
Single-user tutorial says (https://wiki.archlinux.org/title/RVM)
Note: This will install to your home directory only (~/.rvm), and will not touch the standard Arch ruby package, which is in /usr.
But in my case, when I was running
[*** ~]$ curl -L get.rvm.io > rvm-install
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 194 100 194 0 0 541 0 --:--:-- --:--:-- --:--:-- 541
100 24535 100 24535 0 0 52737 0 --:--:-- --:--:-- --:--:-- 52737
[*** ~]$ bash < ./rvm-install
mkdir: cannot create directory ‘/rvm’: Permission denied
But I don't want to install to /rvm directory, I'd like to install to my $HOME path directory.
Help me guys please. What am I supposed to do?

invalid option when trying to curl a file in linux and give it rights for execution and then move it

I am trying to download the file that will install Mate UI and give it rights to the scipt file then move it somewhere else, here is the content of the script (onpurposely one script is calling the other due to provisioning limitations):
sudo curl --noproxy "*" "http://location/install-gui.sh" --output /tmp/install-gui.sh
#install Mate Ui on linux
sudo chmod 777 /tmp/install-gui.sh
sudo mv /tmp/install-gui.sh /opt/
sudo /opt/install-gui.sh
I get:
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 440 100 440 0 0 2430 0 --:--:-- --:--:-- --:--:-- 2430
: invalid option

Issue with cPanel installation

I am setting up cPanel on CentOS but have been facing this problem with connection. Its giving an error of "Connection refused".
I am working on a system with proxy internet.
curl -o latest -L https://securedownloads.cpanel.net/latest && sh latest
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- 0:00:41 --:--:-- 0
curl: (7) Failed connect to securedownloads.cpanel.net:443; Connection refused
Update:
I have changed my VM adapter setting to "Bridged" from "NAT"
Still facing the error.
curl -o latest -L https://securedownloads.cpanel.net/latest && sh latest
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- 0:03:33 --:--:-- 0
curl: (7) Failed connect to securedownloads.cpanel.net:443; Operation now in progress
Check if you have any firewall on your server which is blocking connections. Do a ping to securedownloads.cpanel.net.
ping securedownloads.cpanel.net
If ping is working and still your are getting this error.You can use wget as well.
wget https://securedownloads.cpanel.net/latest && sh latest
If you do not have wget. Install it.
yum install wget -y

How a program know its output will be redirect?

When I use cURL, I Found it seems that cURL knew whether its own output will be redirect, or be input for another program.
Following are two different command:
curl http://www.google.com/
The output will be:
<HTML><HEAD>......blah, blah......</HEAD></HTML>
But if I use redirect or pipe, cURL will print its download status.
curl http://www.google.com/ | xargs echo
the output will be leading with:
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 376 100 376 0 0 2729 0 --:--:-- --:--:-- --:--:-- 5295
<HTML><HEAD>......blah, blah......</HEAD></HTML>
My question is: how cURL know whether its print will be redirect?
isatty(3) will tell you if a FD is connected to a TTY.

Resources