The best basic tutorial on tar and gzip tools I've ever found. Others just explain options approximately like this - "well these -cvf or whatever options are needed so everything is ok". Again, thank you for clarifying this.
You never disappoint Jay. I must always have gedit open when I hit play on your videos, even if I already know about whatever it is, you always manage to ninja in something I didn't know.🤣 WHat you didnt cover and I would consider important is "--exclude=" and the "--exclude" file list....I can never remember where to put this at...good thing I have a .txt cheat sheet.
I would consider myself an expert with compressed files in Windows, but a complete noob in Linux. I really needed this and it was awesome. Thank you so much.
Thank you for the video. I had actually gone through the entire part. In my mind, archiving and compressing are the same operations on file just synonymous. But after the video I realized archiving and compressing are different operations. And we use it together that is, tar for archiving and this archived file will be compressed by gzip.
Thanks for unravelling the mystery (for me at least) of tar and gzip. It's one of those things I knew I had to learn but never got around to. Problem solved!
@13:56 Can anyone explain why he didn't need to provide a name for the extracted file? It took the original name of the file with no input telling it to do so.
the name of the directory was etc on the first place, regardless of the etc_backup.tar file. He could also manually changed the name of the result, but since there was no extra options, the default was etc. Exactly, no output, unless you specify with -v option. Some of the commands in Linux doesn't show any output, unless you use the verbose mode/option -v.
That's the folder size, not the folder and files. If you want to see the size of the folder and files, check the size of etc_backup.tar file and compare that to the tar.gz file
In addition to what @@yjawhar mentioned, you can also use “du -h -d 1 folder-name” to check the size of the folder and the sizes of its immediate subfolders.
Great stuff. I gotta get back to command line administration. GUI interface is handy, and easy; but there is so much more power and flexibility in the command line. What's next - CPIO?
after changing my ownership permissions to my user I was unable to run the command 'tar -cf etc_bkp.tar etc/' -- the output I received was: tar: etc/gshadow-: Cannot open: Permission denied tar: etc/shadow-: Cannot open: Permission denied tar: etc/gshadow: Cannot open: Permission denied tar: etc/shadow: Cannot open: Permission denied tar: Exiting with failure status due to previous errors I then put sudo in front of it and I was allowed, how come I was unable even though my permissions were changed
i mean literally there are 6 steps going in circles and I don't know if that is osmething you hvae to do every time now or if it was just poking around with fodlers and stuff, i havent typed anthing in two minutes and im just waiting to actually unzip the frieaking file
Gunzip is terribly inneficient. It only uses one core of the proccessor. I used to do backups this way and changed to "pigz" wich is the modern versión of gunzip for multiprocessors.
If your purpose was to save room on the drive, you would want exactly that action to take place. The original is still there, it is just made to take up less room on your drive. Of course the main purpose is to create a backup of existing file(s) that does not take up much room on the backup location. AND Jay was careful to point out that you would NOT do this on your /etc directory, which would bork your system. Additionally, there are many more options to the commands which Jay did not mention because they were out of scope for the purpose of the video which was a basic intro to the usage of both tar and gzip and gunzip.
and then when you type the commands in you don't even pause for the person to check if they have the variables or syntax correct, so you sit around for 2 minutes waiting to do something not important to actually well anything and now you have to pause the tape and roll it back to see a 25 string command that could have been on the screen for those whole two minutes, it's like laying shotgun linux, like ok we are goig to do a command in 2 m inutes, bute dont look away because you never know when im going to say it.. and its gone did you miss it? well its ok it wasnt even important anyway, i don't even know how I am going to get this freaking file unzip[ped and i hvaewasted 20 minutes making etc folders back and forth
dude sometimes i just want to see it completed in one string of events. all these things only take like 2 minutes to run and most of the time you are sitting around waiting to see what you are going to type with no way of anticipating it or having anything to reference, if yo hit a snag now you are half way through with a 10 minute explanation for a 2 minute process, just once. everybody always talks and talks and then 9 minutes in there is something you need to go download or fix and you just wasted 20 minuets when you could have figured it out in 2 minutes
Nice video but I would never use etc as an example with people who don't know what they are doing. I know, you warned them, but I still cringe. What can go wrong? That is the first question to ask. Answer: plenty when the user doesn't know how a file system works.
Why not use filesystem compression and never worry about compressing your files ever again? I admit I have to deal with zipped stuff, so it's good to know how to best deal with them. Otherwise ZFS and BTRFS cover all my storage, incl. compression.
One of the best RUclips channels to learn about Linux.
The best basic tutorial on tar and gzip tools I've ever found. Others just explain options approximately like this - "well these -cvf or whatever options are needed so everything is ok". Again, thank you for clarifying this.
Best channel to learn Linux. Really good content. Am supplementing this to my RHCSA cert guide
i was totally expecting you to pipe gzip to the rear of tar . awesome stuff with cz, blew my mind fr
You never disappoint Jay. I must always have gedit open when I hit play on your videos, even if I already know about whatever it is, you always manage to ninja in something I didn't know.🤣
WHat you didnt cover and I would consider important is "--exclude=" and the "--exclude" file list....I can never remember where to put this at...good thing I have a .txt cheat sheet.
I would consider myself an expert with compressed files in Windows, but a complete noob in Linux. I really needed this and it was awesome. Thank you so much.
I still use rar in Linux
Thank you for the video. I had actually gone through the entire part.
In my mind, archiving and compressing are the same operations on file just synonymous. But after the video I realized archiving and compressing are different operations. And we use it together that is, tar for archiving and this archived file will be compressed by gzip.
Thank you for explaining what each of the flags mean in commands. So many Linux tutorials don't do that, and it drives me crazy.
Amazing my friend. Greetings from Brazil
Excellent, as always. I enjoyed this video a lot.
Perfect as always!🔥
Awesome as always Jay! Thanks.
The best Channel to learn Linux... Thank you very much sir...❤️❤️❤️
great video! thank you for taking the time to make it.
Thanks Jay, yet another great video.
thanks dude. i enjoyed it
@Jay thanks for the linux curse with these videos. They truly are good. AND! your audio is nice and loud.
Yeah, sounds really nice on a mobile device 👍.
These videos are great. Thanks for posting Jay.
Glad you like them!
Awesome as always!
Thank you for efforts and quality
Another well explained and demoed video
you're the best huge thank to you for all that knowledge that you allow us to access freely
Thank you man! I like you way of explanation)
Fantastic! Thanks! :)
Nice tutorial
Thanks for unravelling the mystery (for me at least) of tar and gzip. It's one of those things I knew I had to learn but never got around to. Problem solved!
Excellent! Thank you!
Great work 🥳🥳🥳 Thank you 💜💜💜
i got a heart attack when you executed, rm -rf /etc
@13:56 Can anyone explain why he didn't need to provide a name for the extracted file? It took the original name of the file with no input telling it to do so.
the name of the directory was etc on the first place, regardless of the etc_backup.tar file. He could also manually changed the name of the result, but since there was no extra options, the default was etc. Exactly, no output, unless you specify with -v option. Some of the commands in Linux doesn't show any output, unless you use the verbose mode/option -v.
Versatile tutorial, Jay 👍! Thanks and greetings from Ukraine 🇺🇦.
Are you still alive?
Hey man I wanted you yo know I talked to my University about adding your videos to the curriculum. They took it VERY serious. Expect a call man=)
Thank you !
Hello people. Jay's book "Mastering Ubuntu Server" is EXCELLENT. I am reading the 3rd edition.
Sir Here etc file size is 12k and after compression why it is 1.5 Mb ??
That's the folder size, not the folder and files. If you want to see the size of the folder and files, check the size of etc_backup.tar file and compare that to the tar.gz file
In addition to what @@yjawhar mentioned, you can also use “du -h -d 1 folder-name” to check the size of the folder and the sizes of its immediate subfolders.
Thanks a lot!
Great stuff. I gotta get back to command line administration. GUI interface is handy, and easy; but there is so much more power and flexibility in the command line. What's next - CPIO?
*cpio* is very powerful and flexible when fed by *find*
Thank you
Hi Jay, as usual, awesome content, are you planning on SELinux Crash Course?
I honestly did not realize that tar and gzip were separate commands that did different things!
If you do an advanced course on TAR, could you cover how to force an over write of an existing file from the tar archive.
You are amazing
after changing my ownership permissions to my user I was unable to run the command 'tar -cf etc_bkp.tar etc/' -- the output I received was:
tar: etc/gshadow-: Cannot open: Permission denied
tar: etc/shadow-: Cannot open: Permission denied
tar: etc/gshadow: Cannot open: Permission denied
tar: etc/shadow: Cannot open: Permission denied
tar: Exiting with failure status due to previous errors
I then put sudo in front of it and I was allowed, how come I was unable even though my permissions were changed
How can I delete large number of files from target.gz file?
Encryption could be a good next course.
Hey Jay is it just me or is your "journey" plaque not level in the background?
i mean literally there are 6 steps going in circles and I don't know if that is osmething you hvae to do every time now or if it was just poking around with fodlers and stuff, i havent typed anthing in two minutes and im just waiting to actually unzip the frieaking file
Fun video, but I would also like to know how to compress/zip to multiple files, and then reunite them
excellent
Jay, am I safe to assume it will include hidden files as well?
yes
Gunzip is terribly inneficient. It only uses one core of the proccessor. I used to do backups this way and changed to "pigz" wich is the modern versión of gunzip for multiprocessors.
I was surprised to see the original file disappear after gzip compressed it. That was scary. Where went the original?
If your purpose was to save room on the drive, you would want exactly that action to take place. The original is still there, it is just made to take up less room on your drive. Of course the main purpose is to create a backup of existing file(s) that does not take up much room on the backup location. AND Jay was careful to point out that you would NOT do this on your /etc directory, which would bork your system. Additionally, there are many more options to the commands which Jay did not mention because they were out of scope for the purpose of the video which was a basic intro to the usage of both tar and gzip and gunzip.
Just use 7zip instead of having to do the tar and then the gzip.
and then when you type the commands in you don't even pause for the person to check if they have the variables or syntax correct, so you sit around for 2 minutes waiting to do something not important to actually well anything and now you have to pause the tape and roll it back to see a 25 string command that could have been on the screen for those whole two minutes, it's like laying shotgun linux, like ok we are goig to do a command in 2 m inutes, bute dont look away because you never know when im going to say it.. and its gone did you miss it? well its ok it wasnt even important anyway, i don't even know how I am going to get this freaking file unzip[ped and i hvaewasted 20 minutes making etc folders back and forth
dude sometimes i just want to see it completed in one string of events. all these things only take like 2 minutes to run and most of the time you are sitting around waiting to see what you are going to type with no way of anticipating it or having anything to reference, if yo hit a snag now you are half way through with a 10 minute explanation for a 2 minute process, just once. everybody always talks and talks and then 9 minutes in there is something you need to go download or fix and you just wasted 20 minuets when you could have figured it out in 2 minutes
👍
Nice video but I would never use etc as an example with people who don't know what they are doing. I know, you warned them, but I still cringe. What can go wrong? That is the first question to ask. Answer: plenty when the user doesn't know how a file system works.
Why not use filesystem compression and never worry about compressing your files ever again? I admit I have to deal with zipped stuff, so it's good to know how to best deal with them. Otherwise ZFS and BTRFS cover all my storage, incl. compression.
Totally different use case. And it doesn't help at all when you want to exchange sets of files with other people.