Lecture # 10 - Working with Directories in Linux
Creating, Removing, Copying, Moving Directories.

Commands for Manipulating Directories:
Creating a Directory:
mkdiris used to create directory/directories in linux. This command is written asmkdir [directory-name] [directory-name] [directory-name].
Deleting a Directory:
rmdiris used to delete directory/directories in Linux. This command is written asrmdir [directory-name] [directory-name] [directory-name].
Delete a Directory Recursively:
rmis used to delete a directory recursively in Linux. This command is written asrm -r [directory-name].
I made a directory 'DevOps' and inside this directory I made another directory 'Linux'. The 'DevOps' directory cannot be deleted by
rmdircommand because the directory is not empty. It will be deleted byrm -rcommand to delete the directory recursively.Copy Files and Directories:
cpis used to copy files or directories from one location to the other. This command copies the file or directory from the source and paste it to the destination. This command is written ascp [options] [source] [destination].
-> To copy a directory recursively use
cp -r [directory-name] [destination].
-> To copy from a path to a path use
cp [source] [destination].
Move Files and Directories:
mvcommand is used to move files and directories from one location to another or to rename them. This command cuts the file or directory from the source and paste it to the destination path. This command is written asmv [source] [destination].
-> To rename a file
mv [new-name] [old-name]is used.




