Placeholder Image

字幕表 動画を再生する

  • 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 rename, move, copy and delete files within the Lenox operating system.

  • So again, we're using a bun to 18.4 for the demonstrations today.

  • But this should be to say across any Lennox operating system, you should be able to use these commands.

  • There's no really tricks with these particular commands other than it is a little bit weird with the re naming process.

  • So important thing to understand in the Lenox world, at least at the command line, If you were going to a re a name a file, you actually use the move command instead, eh?

  • So this may seem just a little odd, so there's no specific a rien name command.

  • What you do is you use the move command the M A V command, and essentially you move the name of the file to be a different name of file.

  • So basically, if you just want to rename a file, you do m V what the old file name is what the new file name is, and that is the renaming process.

  • That's the only That's the only kind of weirdness and Lennox world just remember in order to rename, you actually use the move command.

  • And that's about it.

  • Another demonstration I'm going to show you today.

  • We are the owners.

  • So Bob is the owners of the files that were going to interacting with today s so I'm not going to need to use the soup command The Super User do command and order Thio interact with files for bleeding, for removing, copying anything like that.

  • I just realized that if you are not the owner So if you were administering a system and for some reason the files that you're dealing with, you're not the owners of those files you may have to plug in soo do beforehand in order to do some of these actions.

  • So if you're interacting with files that you're use your owns, we'll talk about permissions later.

  • Another video, Basically, you're dealing with files that you were user owns.

  • You could just simply use the commands.

  • If you're dealing with files, your user account does not own you may have to plug in the studio in front of that in order to be able to do things such as delete the files.

  • But anyone?

  • Let's go over to the computer and I can show you how the commands work and how simple this is.

  • So here we are, at my a bunch of server again, This is just a standard about to 18.4 This is running within a virtual box.

  • So stock standard a server installation.

  • Whatever server insulation you're using should work the same.

  • Eso no Let us log in s o.

  • Of course.

  • We have a user name of Bub and our super secret password of 123456 And then we hit Enter and we are now long dead.

  • Clear.

  • Clear the screen.

  • I will do P W d.

  • So this command, it shows us what folder?

  • We're currently in this.

  • We're in the Bob folder within the home of older within the root directory.

  • I will then do animal s.

  • So this will list the files and folders within the Bob for us.

  • So I know what's going on and so I can see that I have a folders.

  • There is a folder here called Folder that's in blue and there are no on their files.

  • The first thing that I'm going to do need is I'm going to need a file to work with and I need something to play around with.

  • And so I'm going to create a file and using them s Oh, I like them.

  • I've been getting so much crap about them.

  • I don't get what you use.

  • We just need a file.

  • I'm gonna use them.

  • So them is the file editor that I like to use press enter, and then we're going to give a name for them.

  • So basically, we're gonna create a new file called Test using them.

  • So them space, whatever the name of the file you wanted to be, is your going to hit Ener so we can see down here test new file.

  • So we have created a new file called Test.

  • I honestly do not care what is in this file.

  • So from here I will do colon, so colon breaks us out.

  • W is for save.

  • Q is for quick.

  • So colon gets us into to the little command within them.

  • Uh, w equals right, Q equals quit.

  • So basically, save and quit.

  • I hit.

  • Enter, then all I do is a hit L s.

  • And now we can see that I have a folder called Folder and a file called Test.

  • So since we're messing around with files now, we can deal with that.

  • Let me clear the screen again.

  • So now that I have a file called Test, the first thing that I want to do is really a name that file eso In order to rename the file, I'm going to use the move command again.

  • It's important thing in the Lenox world.

  • For whatever reason, there is no specific rename command.

  • There is a move.

  • Command.

  • All the move command is in V M.

  • V is the movement space, Uh, the file that you're going to be moving or copying space and then where you want it to go on what you want the name to be.

  • So this is one of those things you have to be very careful about, because the move command is also reading command.

  • So what?

  • I think you do have to be careful about analytics World is.

  • You could be a moving a file and the exact same time accidentally a renamed the file.

  • So let's say you're moving the PH.

  • B.

  • I and I.

  • Finally, you're moving some configuration file.

  • Let's say you move the file and fat finger it while you're doing it.

  • You couldn't move it and then rename it.

  • And then, if there are service's or other other things on the server that need to interact with that file, you may run into some issues.

  • So you do have to be careful about this.

  • So let's say you're moving a PHP dot I and I file for some reason.

  • And so you do envy, you know, PHP not I and I to tow wherever it's going.

  • And then instead of doing PHP dot I and II you do PHP I and II right as a terrifying.

  • That's a completely different file.

  • So you move and renamed the PHP deny and I file and you might run into some issues.

  • So be careful about that.

  • It was a move task.

  • Uh, what are we gonna call?

  • Let's do test.

  • Let's just call a backup file, So test not be a K.

  • So we're basically we are going to be changing the name of the file called Test to being tested up.

  • OK, Ener you do.

  • Unless we can see is we still have that folder that we had before, But now we no longer have a file called test.

  • We have a file called a test dot B a k s.

  • So that is how you re names.

  • Let me rename that again.

  • Someone move test B A k and going to move back to being a test.

  • So we have to do to rename hit Enter.

  • We do l s.

  • And now we have the file called Test again.

  • Now, let's actually do a movie.

  • Let's actually do a movie, uh, to do a move, then all when you dio is we simply need to do with the move command V test, and then we're going to do space.

  • And then we're going to say where we want this this, uh, this file move to And so since we have this folder here, I'm simply just going to do folder is gonna go to folder Ford Slash.

  • And then what?

  • The name Miss?

  • Because again, you could move and renamed the same time.

  • I'm just gonna call a test so I'm gonna move test from the folder that it's currently in into the folder and call it Test it.

  • Enter hit l s.

  • Now we can't see.

  • The test file is no longer here by change.

  • Directory to folder now.

  • I'm in the folder.

  • Director on.

  • I do.

  • L s We can see the test file is now there.

  • So I've been able to move the the test file from the folder that was in into the four.

  • I could do the move again, be and then I could do test, and then I could d'oh dot dot So this should go up one level to test dinner.

  • So now if I do l s we can see that there's nothing in this folder anymore.

  • I change directory.

  • I go up one levels of period, period.

  • It brings you up one level.

  • Now I'm up.

  • I d'oh the l s again and we can see that the file is now back up in the original directory.

  • So test is now sitting there.

  • So that is how you re name and how you move files in U Bahn to.

  • So now let's try to do some copying.

  • With that, the first thing that we're gonna do is we're gonna clear the screen, have a nice clean screen.

  • So we know we have the test file.

  • So let's imagine that this test final is a configuration file.

  • It's it's It's the test done.

  • I and I file, you know, we're going to start going in there.

  • I'm gonna start modifying the test that I and I filed for whatever reason.

  • So imagine this with Apache or PHP or squid.

  • Oh, my God.

  • Have you ever seen a squid configuration?

  • Final squid is awesome.

  • That configuration files a mess.

  • One of problems.

  • You get into those that tried to get into the yu.

  • Could you start going into the configuration, Finally start editing things?

  • What happens if you edit something accidentally or totally screw something up?

  • Right?

  • Then all of a sudden the service stops working.

  • You screwed up the configuration.

  • So one of things you should always d'oh Before you start messing around with any configuration file, whether it's for squid or ph.

  • B.

  • I and I are Apache or anything else is you should always create a backup.

  • You created dot B a K file copy of that file so that if you do something stupid, you have a backup to restore from right?

  • That seems pretty simple.

  • So in order to create a backup, all you have to do is use the copy, command you to CP for the further the file that air you're referencing.

  • So we have the test file that we're referencing, and then all you do is you give the new names You're creating a copy this time so the original will stay where it's at, creating a copy, and so again for creating a backup file.

  • You normally do a period B a k Just how it works in Lenox World.

  • So basically what we're doing here is we say copy the final call test and the new the copy of it will be called test dot B a k then we hit Enter, then all I have to do is go to l s u l l There I just can't do l s.

  • And now we can see about the folder.

  • I'm not the original test file, and I've got the backup of the test files of the test dot B a k.

  • So that's all there really is for copying again.

  • You could.

  • D'oh!

  • You can actually dump a file into a folder so I could do test.

  • Um, And then I do go Thio folder.

  • Could you test got B A k?

  • So this is actually in the folder, right?

  • So I could do that dinner Now, if I go here l s so I still have the test and the test on B A k is I had before I can change directory going to folder at last here and now you can see I have a test, not be a k here.

  • So again.

  • So maybe maybe on your server, you just have one folder for all the backup files for your configurations seeking simply do the copy and dump it.

  • Dump the copy into that one.

  • The centralized folder.

  • And then you can recover it if you need it from there.

  • The only thing we need to be able to do now is we need to be able to delete eso in the Lenox world.

  • Delete is the r M command.

  • So our m then you do space and then you delayed whatever file it is you're trying to believe.

  • So test Dr B a.

  • K.

  • Right.

  • So I'm in.

  • You always have to make sure where you're at.

  • Right.

  • So I'm in the folder, so let's go back.

  • Let's just make sure.

  • Let's let's make sure where we know where we're at.

  • Okay, so you pwd pwd shows us we're in the folder.

  • Whole folder in the folder called Bob In Home.

  • Right.

  • So we know where we're at, so Okay, it's like, OK, I definitely configuration can get or whatever else.

  • I'm confident with it.

  • I wouldn't believe this particular backup file.

  • So all I do is that you are space test que hay en, er we do less and as we can see and there is nothing any longer in the folder now, one of the interesting things, though, with the remove command, is that you can remove multiple files at the same time.

  • Let's go up one level.

  • Let's go back into that Bob folder.

  • Clear the screen.

  • Okay, so up here we do.

  • L s.

  • We take a look.

  • And so we got full order, obviously.

  • But then we've got a test file and a test B A k file here.

  • Now that I'm looking at this and like Okay, well, I did this project.

  • I did this demonstration.

  • I want to get rid of both of these files at the same time.

  • It's no big deal.

  • I just do our m test.

  • So I do the first file.

  • I want to leave space test B, a k a.

  • The second file.

  • I want elite.

  • So on and so forth.

  • And then all I have to do is I hit.

  • Enter.

  • Both files have been deleted at the exact same time.

  • Do l s and we can see.

  • And now all I have left is the folder, eh?

  • So that's really all there is to renaming, moving, copying and deleting files with Ann Lennox in order to rename, use the move.

  • Command the M V command.

  • In order to move you use the move Command over the envy Commit in order.

  • Copy.

  • Used.

  • Used the cp Command in orderto delete.

  • You use the r m a command.

  • The important thing that I will remind you with all this is I was the owner of the file that I created and we're gonna do this s o I didn't have to use to do anywhere if you were an administrator on a system and for some reason you need to go in and tweak something, and you may not actually be the owner of the file that you're interacting with.

  • You may have to use pseudo in order.

  • To be able to have the privilege is to be able to do whatever you're trying to do.

  • So I guess that's that's the one things.

  • If you're the owner of the file and you're trying to do any of these, obviously it works.

  • If you're not the owner, just realize you may have to use studio.

  • Other than that, as with much, many things in Lenox, it's really easy as long as you know the commands.

  • You know the command is simple.

  • You don't know the man, so that's all there is to renaming, moving, copying and deleting files in you, Bunty or really any distribution of Lennox?

  • It all should be more or less the same.

  • As with all of these commands, there are options and arguments that you can add again.

  • There's a whole plethora of them.

  • Most of the time it doesn't matter, so I didn't go into it today.

  • But if you're trying to do something with a file, you're trying to see if you could do something a little bit more specific or possibly you're running into issues like you may have to force delete.

  • You may have to force something.

  • Just go to the man page or just go to Google.

  • Take a look of the arguments and options, and one of those arguments or options may do what you need.

  • Have accomplished.

  • Just just remember that again.

  • It's very important.

  • Understand in the Lenox world is that you have the command and command does a lot.

  • But a lot of times the arguments and the options that you add to that command really are what allow you to do whatever you're trying to do.

  • So just keep that in mind.

  • You should be fine.

  • Yeah, my again, a force or something you may have to use normal.

  • Normally you'll be fine.

  • The only issue again.

  • As an administrator of a system as administrative assistant, the only thing that you may honestly run into is just simply, if you are not an owner of the file that you're dealing with, you may have to use sue to enable, in order to do whatever you're trying to accomplish just to give that those escalated privileges to allow you to have mission.

  • But otherwise everything should be relatively simple.

  • S O that, as always, enjoyed doing this video and look forward to see what the next one.

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.

字幕と単語

ワンタップで英和辞典検索 単語をクリックすると、意味が表示されます

A2 初級

Linux - ファイルの名前変更、移動、コピー、削除 (mv, cp, rm) (Linux - Rename, Move, Copy and Delete Files (mv, cp, rm))

  • 7 0
    林宜悉 に公開 2021 年 01 月 14 日
動画の中の単語