The ls
command line utility lists all the files and directories under a specified directory. By default, ls uses the current directory and lists files and directories in alphabetical order by name. The ls command supports many flags that modify its behavior.
syntax
:- ls [option] โต
The pwd
command writes to standard output the full path name of your current directory (from the root directory). All directories are separated by a / (slash). The root directory is represented by the first /, and the last directory named is your current directory.
syntax
:- pwd [option] โต
The cd
command, also known as chdir (change directory), is a command-line shell command used to change the current working directory in various operating systems.
syntax
:- cd [option] โต
syntax
:- cd โต
The mkdir
command in Linux is a command-line utility that creates new directories in the file system. mkdir stands for "make directory".
syntax
:- mkdir [option] directory name โต
The rmdir
command in Linux removes empty directories from the system. Here are some things to know about the rmdir command:
syntax
:- rmdir
remove directory name โต
The mv
command moves files and directories from one directory to another or renames a file or directory.
syntax
:- mv
remove directory name โต
touch command:
It is used to create a file without any content. The file created using the touch command is empty. This command can be used when the user doesn't have data to store at the time of file creation. Using touch Command Initially, we are in the home directory and this can be checked using the pwd command.
syntax
:- touch
remove directory name โต
The file command
reads the files specified by the File parameter or the FileList variable, performs a series of tests on each file, and attempts to classify them by type.
syntax
:- file
remove directory name โต
One of the most useful commands in Linux is the zip command
, which allows you to create and manage compressed archives. A zip command is a powerful file packaging utility that can be used to compress and extract files and directories, as well as to add, update, and delete files from a zip archive.
syntax
:- zip
remove directory name โต
The unzip command
is a powerful tool for extracting files from ZIP archives. It supports a range of options and flags for controlling its behavior. The command can be used to extract single or multiple files from an archive, test the integrity of an archive, and list the contents of an archive, among other things.
syntax
:- unzip
remove directory name โต