Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
3 views

Unix Basic Command

The document provides a list of basic UNIX commands related to file and directory management. Key commands include 'pwd' for printing the current directory, 'ls' for listing files, 'cd' for changing directories, and 'mkdir' for creating directories. Additional commands such as 'cp', 'mv', 'ln', and 'rm' are also explained for file manipulation and management.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

Unix Basic Command

The document provides a list of basic UNIX commands related to file and directory management. Key commands include 'pwd' for printing the current directory, 'ls' for listing files, 'cd' for changing directories, and 'mkdir' for creating directories. Additional commands such as 'cp', 'mv', 'ln', and 'rm' are also explained for file manipulation and management.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

UNIX Commands

Basic Commands
I File and Directory Related commands
1) pwd
This command prints the current working directory
2) ls
This command displays the list of files in the current working directory.
$ls–l Lists the files in the long format
$ls–t Lists in the order of last modification time
$ls–d Lists directory instead of contents
$ls-u Lists in order of last access time
3) cd
This command is used to change from the working directory to any other directory specified.
$cd directoryname
4) cd ..
This command is used to come out of the current working directory.
$cd ..
5) mkdir
This command helps us to make a directory.
$mkdir directoryname
6) rmdir
This command is used to remove a directory specified in the command line. It requires the specified
directory to be empty before removing it.
$rmdir directoryname
7) cat
This command helps us to list the contents of a file we specify.
$cat [option][file]
cat > filename – This is used to create a new file.
cat >>filename – This is used to append the contents of the file
8) cp
This command helps us to create duplicate copies of ordinary files.
$cp source destination
9) mv
This command is used to move files.
$mv source destination
10) ln
This command is to establish an additional filename for the same ordinary file.
$ln firstname secondname
11) rm
This command is used to delete one or more files from the directory.
$rm [option] filename
$rm –i
Asks the user if he wants to delete the file mentioned.
$rm–r
Recursively delete the entire contents of the directory as well as the directory itself.

You might also like