Linux Directory and File Operations

RSS
EMAIL
FACEBOOK
FACEBOOK
GOOGLE
GOOGLE
https://www.poftut.com/linux-directory-file-operations/
PINTEREST
PINTEREST
INSTAGRAM

Most basic Linux usage start with Linux file and directory operations. We will look these operations to cover basics.

List Directories and Files

Start of the navigation in file system starts with listing the directories and files

List Directories and Files
List Directories and Files

List Hidden Files and Directories

All operating systems have hidden files to hide it from used. It is not security related feature. It it related about operation and reliability. Showing configuration files in home directory have no benefits. So by default hiding them is better.

List Hidden Files and Directories
List Hidden Files and Directories

List Files and Folders Recursively

We can all child files and directories by providing recursive option

List Files and Folders Recursively
List Files and Folders Recursively

Change Directory

We can go to the root

Go User Home Directory

We can go to the home directory by using ~ tilde which means current user home.

Go Upper/Parent Directory

We can go to upper directory with doble point .. which means parent directory

Go Given Path

We can go to the log directory

Go Given Path
Go Given Path

Show Working Directory

We can work different systems and directories in day to day operation. We may not remember  current directory of the shell. We can get current working directory with pwd command.

Show Working Directory
Show Working Directory

Delete File and Directory

We may need to delete a file or folder. rm and rmdir are commands used to delete file and directories.

I can not deleted the directory because there are files or directories in it. We can force for deletion

  • -Rf option will make deletion recursive and forcibly.
LEARN MORE  Useful Linux Commands A System Administrator Should Know

Move Files and Directories

We can use mv command to move files and directories

RSS
EMAIL
FACEBOOK
FACEBOOK
GOOGLE
GOOGLE
https://www.poftut.com/linux-directory-file-operations/
PINTEREST
PINTEREST
INSTAGRAM