Day to Day Recipe

January 5, 2025

download a file.

# Download file
curl "<url>" -OL


# Download file & rename
curl "url" -o "<new_name>" -L
flagdescription
-o <file_name>write output with name <file_name>
-Owrite output as the same name
-Lfollow redirect allowed

extract .tar.gz archive

tar -xzvf <your archive .tar.gz / .tgz>
tar -xzvf <your archive .tar.gz / .tgz> -C <output directory>
flagdescription
-xxtract
-zuse gzip compression
-vverbose
-fthe input file ...
-Cthe redirect