B2 中高級 9 分類 收藏
開始影片後,點擊或框選字幕可以立即查詢單字
字庫載入中…
回報字幕錯誤
please go to the line the computer guy dot com, in order to view schematics, code and Maur for the projects that you are learning about.
Welcome back.
So today's video I'm going to show you how to deal with tar balls in the Lenox world, so Tar Balls and Lennox World essentially correspond with zip folders in the Windows world.
So if you download a folder, possibly for things like device drivers and the Windows World, and you have to use something like wind, zip or seven zip something like that to be able to un compress the folder that you're dealing with, that's essentially what we're going to be dealing with today on Lee in the Lenox World.
So the issue that you run into if you're trying to move folders around is that the question comes, is how are you able to essentially hand off a folder to another person and another computer and make sure everything is intact?
Well, the way that you're able to do that is you're able to turn that folder into an archive, so everything within that folder becomes one solid file that you're able to transfer, and then what turns it into a ball.
So tar is the archiving the ball is.
Then you then compress that new file that you've created.
Take out all the extraneous data that's not needed to basically be a bit shrink it as small as possible so that you're able to send it over the Internet.
Something like that.
So when you're talking about a tar ball, what you're doing is you're taking a folder.
You're turning it in art into an archive files.
That's the tar process.
And then you're using something called a Jesup compression algorithm to think compressed that archive file that you created.
And then that's what gives you the ball component.
So what I'm going to show you how to do today is we're going to basically Tar Bowl, a folder that I've created with a number of files in it, and then going to show you how to actually list the items in that new archive that we've created S O, that if you're looking through different tar ball archives and you're trying to figure out which one you want, un compress the easiest ways to actually see what's in it before you do the compression and then what I'm going to show you how to do.
Is that actually be able to retrieve the items from the archive, Basically be able to pull them out again so that let's go over the computer and I can show you how this works.
So here we are, at my job unto Atlantic Server.
I'm using 18.4 not three.
Lt s.
But what I'm showing you today should more or less work on any distribution and should work, you know, decades into the future.
This is a pretty standard thing that I'm showing you.
We're gonna log in with Bob and my super secret password.
123456 And we have now logged in the system.
I will clear the screen on then from hero used the PWD command.
This will show us where we are in the file structure on this particular system.
So I'm in the Bob folder in the home directory, you know, do l s space hyphen else.
This is going to list everything with any of this Bob folder.
And so what?
We can see here as we have two folders, a new folder and a test folder, and we have three files.
Test file Tim, file Tim file too.
So this is everything that's basically left over from another one of the videos that I was doing?
That's what we're gonna be dealing with today is the test folder.
So Test folder is what we're going to archive Tarm all this on.
Then we're going to untie Arbaugh lit eso let us change directory and go into test folder just to make sure that there's something in there.
And I'll do l s hyphen now.
Space hyphen.
L.
So this will list the items in a test folders within test folder.
We have filed one file to file three.
So imagine if we needed FTP things somewhere.
Maybe we needed an email.
Basically, be able to send this folder with all of its contents somewhere.
It would be a lot easier to deal with if it was just one.
This single archived file versus a folder with a full structure.
So we're gonna do is gonna go to C D space period, period.
What this is going to do is this guy is going to change directory.
It's gonna make us go up one directory do l s hyphen l again.
And so now again, we're back in that bob directory.
So we got the new folder test file test folder.
And so test folder is what we're going to be dealing with.
So all we need to dio the command that we need to use is t a r so tar So we're gonna use tar, and then the arguments and options that we're going to be adding to this are what are very important.
So we're going to do a hyphen, So hyphen is going to add the arguments and options were going, you see, So C is for create, then we're going to do Z Z is for compress with Jeez, it.
So we're gonna create the archive file, and then we're going to compress it with cheese.
It then passed that we're going to do VI for boasts.
So basically, this is what's going to tell us what's going on with the process, and F actually allows us to specify a file name.
Then we're going to do space, and then we're going to say what the name of the new archive is.
So what?
I'm just gonna call it t a r park up if then we got to do dot t a r to represent a tar file and dodge easy to represent a compressed file.
So when you look at that dot tar dot g Z, this is when you're enough, you know, you're dealing with a tar ball, so basically it's archive file that has been compressed.
Then we're going to do space, and then we're going to say what folder?
We are doing this process too.
So we're gonna test folder, That's all there is to it.
Satar, hyphen create Z is for compress.
V is for boasts, efforts for final name.
We then give it a file name.
Whatever the hell you want to call it.
I'm simply calling this tar archive dot tar dot gz.
Make sure you put the dot are not DJ Z at the end, so people know what it is on.
Then we're what we're going to be doing.
This, too, is to the test folder that I'm going to hit.
Enter.
You see this?
So this is the burr boast.
It's telling what's going on than I do l s space analyst.
This shows us what's in the directory then.
So now we can see down here.
We now have this tar archive dot ta are not easy archive.
Do do realize here that our original folder still exists.
So this isn't some kind of, like, weird copy commander or move command or something like that.
What we're doing is basically we're creating a complete copy of the test folder as an archive that has been compressed.
And so now, now we have our nice little tar ball.
Let me clear the screen.
And then what I need to dio is I want to list the items in that horrible So l s space hyphen.
L again.
So I couldn't see you.
Make sure you don't misspell anything.
And so let's say I'm sitting here.
I'm sitting here and it's like, Oh, I've got this tar ball But I don't necessarily want to decompress the Tar Bowl if I don't know what's in the tar ball, you know?
Is this device drivers?
This is just some some wacky notes I did a few years ago.
What's in this?
So what I'm gonna do is use a tar, commands a car space, and then hyphen hyphen.
So it's two hyphens there.
Two hyphens are single want simply one We're gonna say list.
They were gonna do space hyphen F.
So list is basically option to be able to list the items within a tar ball.
Three hyphen F says I'm gonna give you a final name of what I want to see Tar archive the tar dot Easy.
So tar, this is the command hyphen hyphen list.
I want a list.
The items in hyphen f a file.
Call it our archive dot tard.
Like easy again.
Make sure capitalization and all that is correct.
And then I will hit Enter.
And there we go.
So we can see the intar archive dot Tardive Easy.
We have a folder called Test folder with file three, file one file too.
So we go.
Oh, okay.
So that's that.
That's the That's the art high that I want to deal with, eh?
So what I'm gonna do now is I'm going to actually copy the Tar Archive, not tardive easy into new folder so that I can un compress it there.
So think about this.
As I am moving this across the network, I'm emailing it to somebody.
Something like that.
So what I do and I did a copy.
Commands of C P is the copy command T A r archive again.
Don't misspell.
Don't, uh, don't get bad.
Don't get fat figures on this figures.
So what we're gonna do is we're a copy.
Tar archive dot tardive.
Easy on one.
Copy it.
Too.
New for new border boards.
Last are archive.
Are you see?
And again, Remember, when you copy, Make sure you know what Name name you're using for the copy.
So if you screw this up again, you'll have problems.
Then we're just going hit.
Enter then.
From here.
L s hyphen.
L again.
So we see the new folder.
This is the old tar archive dot Tardive Easy.
I want to change directory C d.
You knew border.
And then in new folder will do l s hyphen Al to make sure it's been copied.
So we're in the new folder and we can see that tar archive dot are not easy is here.
It was clear again I would do l s hyphen.
L just again.
So I can sit here and make sure I know what archive file I'm dealing with.
And now all I'm going to do is extract.
So in order to extract all I have to do with duty, they are hyphen R space hyphen X.
So X is for extract.
Z is for because it needs to be on Angie's it so it basically needs be un compressed V for verbose and F for file.
Then what I'm just going to do is simply going to feed it.
This tar archive dot tart you zeke satar archive dot tar dot easy.
So everything is right here.
All I do is sit in er and we can see the verbose here, so that has been extracted.
If I do l s space hyphen.
L we can now see we have the test folder.
If I go into test folder and I do Alice hyphen l and test folder, we can see all of the items are there.
So that is how you're able to to archive and compress.
You're able to create a tar Bauer ball out of a folder.
That is how you can list the items in that tar ball.
And then that is how you're able to un compressed, enviable extract the information that is in a tar ball.
So it's all relatively simple, especially in Lenox World.
When the nice things in Lenox World is.
This is all completely built in has been built in for years s so you don't run into the same kinds of problems that sometimes you can run into in the Windows world when you have a compressed for a zip file.
So that's the basics of tar balls.
That's how to create a tar ball that's have a list, the items in a terrible that's an important one.
I notice that if you look at a lot of the demonstrations, or if you look at the one of the classes that teach about tar balls, for some reason they skip out that whole listing items.
And I find that just to be an absolutely terrific tool, because again, you know, you go into some directory and there's a whole bunch of tar balls in there and there's there's a question of like what is actually in them, and do you want to have to extract them before you know the ability to simply list the items in a terrible makes life a lot easier on?
Then finally, I showed you how to copy the tar ball wherever you want.
A copy, too, on then to be able to extract as many things are in the Lenox world.
What I showed you today is what you're going to be doing 98% of the time.
Right, creating archives, listing items and archive and extracting archives.
But as always in Lenox World, there's about 1000 options you can ask, So make sure to go over to the man page or link.
I'll put it into the description to see all the other things that you could do because there are some interesting things you can do with this whole tar command.
But again, these are the three things that you'll mainly used in the real world san.
As always, I enjoyed doing this video and look for anything on the next one.
提示:點選文章或是影片下面的字幕單字,可以直接快速翻譯喔!

載入中…

Linux - Tarballs, Archive and Compress Folders (tar)

9 分類 收藏
林宜悉 發佈於 2020 年 3 月 26 日
看更多推薦影片
  1. 1. 單字查詢

    在字幕上選取單字即可即時查詢單字喔!

  2. 2. 單句重複播放

    可重複聽取一句單句,加強聽力!

  3. 3. 使用快速鍵

    使用影片快速鍵,讓學習更有效率!

  4. 4. 關閉語言字幕

    進階版練習可關閉字幕純聽英文哦!

  5. 5. 內嵌播放器

    可以將英文字幕學習播放器內嵌到部落格等地方喔

  6. 6. 展開播放器

    可隱藏右方全文及字典欄位,觀看影片更舒適!

  1. 英文聽力測驗

    挑戰字幕英文聽力測驗!

  1. 點擊展開筆記本讓你看的更舒服

  1. UrbanDictionary 俚語字典整合查詢。一般字典查詢不到你滿意的解譯,不妨使用「俚語字典」,或許會讓你有滿意的答案喔