Thursday, 6 October 2016

PS1 && wget

85. How to set the bash to show your user and machine name?
PS1="[\u@\h:\w ] $ "


86. How to download a file and unzip and utar it to a directory?
wget http://ftp.gnu.org/gnu/gdb/gdb-7.11.tar.gz -O - |gzip -d | tar -xvf -
-O - redirect the flow to std::io, and | pipe it to gzip -d, which unzip this file, and tar -xvf - , untar the
already unzipped file.

87. How to copy a link for a downloadable file on a web browser?
First find the link, and don't left click the file that you want to download, just right click it and choose "
copy link address" and then you can use wget to download it on unix.
e.g. wget http://ftp.gnu.org/gnu/gdb/gdb-7.11.tar.gz

No comments:

Post a Comment