How to Use Tar on Linux | Command Line Tips from Linode's Top Docs

Ғылым және технология

tar provides a standard interface for bundling files on Linux. In this video, Jay from ‪@LearnLinuxTV‬ shows how to use tar in the command line.
Chapters:
0:00 Introduction
0:47 Gathering files to use with tar
3:05 What does tar do?
3:46 How to create a tar file
7:06 What’s inside of a tar?
8:48 Creating a tar with a line count
9:23 Creating a tar with verbose mode
11:11 Extracting a tar file to a folder
14:18 Using the gzip command
16:40 Decompressing files with gunzip
17:30 Combining gzip with tar
21:30 Viewing the contents of a tar.gz file
22:30 Conclusion
New to Cloud Computing? Get started here with a $100 credit → www.linode.com/lp/youtube-vie...
Read the doc for more information on tar → www.linode.com/docs/guides/co...
Learn more about command line basics → www.linode.com/docs/guides/li...
Subscribe to get notified of new episodes as they come out → kzread.info?sub_co...
#Linode #Linux #tar #LinuxCommands
Product: Linode, tar Command, Command Line; @LearnLinuxTV ;

Пікірлер: 13

  • @BillAugersdca
    @BillAugersdca Жыл бұрын

    I always get something useful from watching your videos, thanks mate.

  • @danielnadar75
    @danielnadar75 Жыл бұрын

    The only video I ever need for understanding tarball and compression! Thanks a lot Jay you are wonderful.

  • @zameerpashablr
    @zameerpashablr Жыл бұрын

    You are the Genuine Master of Linux in this World. God bless you.

  • @gracienlebel4824
    @gracienlebel4824 Жыл бұрын

    This tutorials ate awesome, so useful

  • @baruchben-david4196
    @baruchben-david4196 Жыл бұрын

    When using chown, if your group and user are the same, you can do chown -R name: . The colon implies the group is the same as the user.

  • @keffen611
    @keffen611 Жыл бұрын

    Thanks Jay. What's the difference between etc and /etc?

  • @shallex5744

    @shallex5744

    Жыл бұрын

    /etc means the directory 'etc' located in the root of the filesystem, which is represented by the / character by itself, the full path of the directory being /etc, and is a directory that exists on every Linux system as a place to store system-wide configuration files the etc directory without the slash was a newly-created directory by Jay, which was created in Jay's home directory when he copied it from /etc the full path of Jay's etc copy would be /home/jay/etc, or represented in short as ~/etc, with ~ being shorthand for your own user's home directory, but was simply referred to as 'etc' because Jay was already working from within his own home directory, therefore specifying its full path was unnecessary

  • @abhishektyagi4428

    @abhishektyagi4428

    Жыл бұрын

    @@shallex5744 thanks , also how would you differentiate/understand Trailing slashes / example - when using mv command or something else - mv source /dir or mv source/ /dir/

  • @shallex5744

    @shallex5744

    Жыл бұрын

    @@abhishektyagi4428 i'm not sure, i never use trailing slashes (intentionally), but after testing it just now, moving the file source/ with the slash at the end doesn't work because putting the slash at the end makes the mv command think you're trying to move a directory when it is actually a file, and gives the error "Not a directory"

  • @berrywin
    @berrywin Жыл бұрын

    I know this is an example but making a backup of /etc and make all files belong to a non sudo user makes the files unusable.

  • @send2gl
    @send2gl Жыл бұрын

    I've often wondered, as the tar file is uncompressed and the same size as all files combined why not just create a new directory instead of the tar file? The directory can be compressed if there is a need to save space.

  • @AkamaiDeveloper

    @AkamaiDeveloper

    Жыл бұрын

    The command syntax you're looking for is: tar -xf $FILENAME.tar.gz --one-top-level=$NEW_DIRECTORY_NAME This will create a new directory within your current directory and unzip the contents of the tarball into that directory. On its own, tar just bundles files, you'd need to add -c to your command to actually compress the newly created tarball.

  • @nopenope6272
    @nopenope6272 Жыл бұрын

    its fucking amazing I have to go to KZread to get taught shit. taking a college class for linux and they not teaching me shit. dunno why I'm paying for nothing

Келесі