Linux - Make, Rename, Move, Delete Folders (mkdir, mv, cp, rm)

preview_player
Показать описание

Managing folders is much like managing files in Linux. Just remember to use the -r option (recursive) for copying and deleting.

Make Directory

mkdir newfolder – Creates a folder called folder
Rename Directory

mv newfolder newfolder2 – Renames folder to be folder2
Move Directory

mv newfolder folder/newfolder – Moves newfolder into the folder directory.
Warning: You can move AND rename a folder at the same time even by accident.
Copy Directory

-r means “recursive” and so copies both the folder and all contents.
Delete Directory

rm – rf newfolder – Deletes newfolder and all contents
-f is the “force” option and may be needed if files within the directory are protected for some reason.
Рекомендации по теме
Комментарии
Автор

you can easily make blank files with command: touch "filename"
for anyone who wanted to know

dddk
Автор

Why didnt you live stream our apple event again? 😁

aaronfickling
Автор

Just learning linux! this videos are really helpful. thank you!

jessicajurado
Автор

Why would so many people dislike a good video like this?

RealHIFIHelp
Автор

You can do

mv newfolder folder


instead of

mv newfolder folder/newfolder

This will prevent any renaming accidents. However if 'folder' didn't exist, then instead of moving, this will cause 'newfolder' to be renamed to 'folder'.


Also you can clear screen using Ctrl + L

saulgoodman
Автор

Thanks for the video! It deserves more views and likes

janajakovcuk
Автор

İgnore the dislikes. Quality of content in all videos is there. Most people see what is quality and what is trash :)

kawdjer
Автор

I've no idea why so many dislikes...Anyway... I want to express my highest gratitude to you for making these educational series. The videos are extremely helpful! Thank you, Eli!

kostyashoomsky
Автор

thanks for the vid and in particular this moment 2:32

chescarino
Автор

Always smart to refresh those Linux skills! Ty!

minibit
Автор

Great tutorial Eli, love your videos.

danielfcand
Автор

The word folder has lost all meaning. Fol-der

dravenlarson
Автор

You really hammered in the consequences of fat fingering the mv command, but I feel that you didn't hammer in enough the consequences of using rm -rf. You should let people know that rm -rf permanently deletes the folders, it could delete years of work in a moment or it could delete a system folder as well if used with sudo, causing your server to be permanently lost. These points were not underlined enough.

jiteshruch
Автор

Folder!? Folder!? DIRECTORY!! just sayin'...

DrBenway
Автор

I am downloading this before youtube decides to take it down lol

p.s. Deep inside I was still hoping to see some of your commentary on the latest Apple Keynote, but on the flipside - considering what they/& youtube did to you after the latest commentary - i see no chance for you doing something like that anymore ;/

PicyPoe