Professional Documents
Culture Documents
3rd semester
SUBMITTED SUBMITTED
BY TO
NAME:- Mohd Kashif LECTURER:- Shivam
Gupta
ROLL NO:- 2002111038 DESIGNATION:- LECTURER
INDEX
S.NO PRACTICALS
CLS COMMAND ::
These commands clear all the text from the screen and show the user
a Command prompt.
(Syntax)
DATE COMMAND::
(Syntax)
TIME COMMAND ::
While creating a File there are some rules, that a primary file name
must not be greater than 8 characters and the extension must be not
greater then 3 characters. Filename can consist of digits and special
symbols such as 0 to 9 or @ # % etc
(Syntax)
TYPE COMMAND::
(Syntax)
If the content of the file is large and cannot be entirely viewed on the
display device use the following MS-Dos command.
(Syntax)
RENAME COMMAND::
(Syntax)
For Example, you have a file name abc.com and want to change the
file name to computer.xyz .Use the below command.
COPY COMMAND::
Copy is a Basic internal dos command which is used to copy files from
one location to another. while using copy command you have to
specify the path or address of the file and location where you need to
copy that file.
Do not forget to mention the address of the file and the destination
where you need to copy it.
(Syntax)
Using wildcards you can copy each and every file present in a
directory for example if you need to copy files that are present in
d:\songs to e:\newsongs use the following command.
You can use switches present in the copy command to know the
various switches using the below-mentioned MS-Dos command.
DELETE ::
(Syntax)
In the above command, all the files which have an extension .abc will
be deleted.
DIR COMMAND ::
DIR Command Is used to display all the files and directories along
with the filename, extension, creation date, and modified date.
(Syntax)
MD COMMAND::
(Syntax)
CD.. COMMAND
For Example::
C:\>
CD\ COMMAND::
VOLUME COMMAND::
VOLUME COMMAND is another Basic internal dos command which is
used to display the information of your current drive.
(Syntax)
C:\>Vol (Press Enter)
PRACTICAL:- 5
OBJECT:- DISK OPERATING SYSTEM EXTERNAL
COMMANDS.
For example, to run the fdisk command you will need a fdisk.exe or
fdisk.com file inside your computer system or bootable drives.
FORMAT COMMAND::
which can be any flash drive, hard drives, or floppy disk. The format
command creates a new allocation table and root directory and makes
the drive usable.
The command also checks for bad areas of drives commonly called
bad sectors.
(Syntax)
DISKCOPY COMMAND ::
(Syntax)
XCOPY COMMAND::
(Syntax)
In the above Example, xcopy will copy all files and directories from
c:\movies to d:\new .where /s is used for copying non empty
subdirectories.
(Syntax)
DOSKEY COMMAND::
(Syntax)
EDIT COMMAND::
When used with an edit command it allows the user to edit the
information or text in a file using a text editor. to run or execute the
edit command you need to have a supporting file named edit.com
(Syntax)
For example, if you want to edit a file named abc.com use the
following syntax.
After editing the text inside the file do not forget to save the file using
the menu.
ATTRIB COMMAND::
For Example if you want to hide a file or a directory use the following
command.
Now the file abc.com is hidden and you can not view the file using dir
command. Perhaps if used dir/ah you can see the file as the file is
hidden and dir/ah is used to view the hidden file in the computer
system. Let's say if you need to unhide the file or want to view the file
without using dir/ah
(Syntax)
MODE COMMAND::
DELTREE COMMAND::
(Syntax)
Here all the subdirectory and files will be deleted and a warning
message will appear if you press Y It will delete and if you press N it
will stop executing the command.
There are some switches used in the deltree command to know if they
use deltree/?.
LABEL COMMAND::
(Syntax)
(Syntax)
What is Linux?
Linux is an Open-source and multi-user operating
system which allows multiple users to use the same
computer at the same time.
Various versions of Linux operating system:-
• SUSE
• FEDORA
• DEBIAN
• REDHAT
• UBUNTU
• KNOPPIX
• SLACKWARE
Linux Commands
Commands are something which tells the operating
system to perform set of operations.
Some commands of are as follows:-
Command:ls
Use:-Lists the files in the directory in which you are in.
Command:pwd
Use:- Shows the directory in which you are currently
working.
Command:mkdir [name of the directory]
Use:- To create a new directory.
Command:touch [file_name]
Use:- To create a new file.
Command:rm [file_name]
Use:- Remove a file
Command:rm -r [directory_name]
Use:- Remove a whole directory.
Command:cp [1st_file_name] [2nd_file_name]
Use:- Copy the contents of one file to another file.
Command:cd
Use:- Change the directory to $HOME
Command:sudo[command_to_be_executed_as_rootuser]
Use:- Execute any command with root privilege.
Command:ls -la
Use:- Lists all the files including the hidden files with their
detailed info.
Command:cat > [file_name]
Use:- Creates a new file.
Command: grep [keyword] [file_name]
Use:- Search any keyword in any file.
Command: wget [download_link]
Use:- Download files from the internet by download
link.
Command: clear
Use:- Clear the existing terminal screen.
Command: history
Use:- History command shows all the commands that you
have used in the past for the current terminal session.
This can help you refer to the old commands you have
entered and re-used them in your operations again.
Command: clear
Use:- To clear the screen.
Command: date
Use:- To see the system’s date.
Command: time
Use:- To see the system’s time.
Command: cal
Use:- It is used to see the calendar of any specific month,
or a complete year.
Command: who
Use:- It is used to see the details of various users who
are currently log in.
Command: ps
Use:- It is used to see various process running at a
terminal.
Command: pwd
Use:- It is used to see the present working directory.
PRACTICAL:- 9
OBJECT:- STUDY OF VARIOUS FILE
MANAGEMENT COMMANDS IN LINUX OS.
Command: cat[file_name]
Use:- It will display the contents of the file filename.
Command: rm
Use:- To remove a file use “rm”.
Syntax: $ rm filename
PRACTICAL:- 10
OBJECT:- STUDY OF VARIOUS WORD, LINES
COUNT COMMANDS.
Command: wc
Syntax:-$ wc[options] filename.
Use:- Gives the number of lines, words and characters in a
file called filename
Syntax:-$ wc –l filename
Use:- Gives the number of lines
Syntax:-$ wc –w filename
Use:- Gives the number of words
Syntax:-$ wc –c filename
Use:- Gives the number of characters
PRACTICAL:- 11
OBJECT:- STUDY OF VARIOUS DIRECTORY
MANAGEMENT COMMANDS.
Command: ls
Use:-To lists the files in the current directory use “ls”. ls
has many options:
-l long list (Displays lots of info)
-t lists by modification date
-S lists by size
-h lists file sizes in human readable format
-r Reverse the order
-a Lists all hidden files
Command: ls ?ain
Use:- When above command is executed it displays all the
file names having last three characters are “ain”, ignore the
first char (? Replaces single char).
Command:- $ls s*
Use:- When above command is executed it displays all
the files which begins character “s”, ignore the rest of
the characters(* replace multiple characters).
PRACTICAL:- 12
OBJECT:- STUDY OF USING THE COMMAND
FOR CHANGING FILE PERMISSIONS.
Command: chmod
Use:- If you own a file, you can change its
permissions with “chmod”.
Syntax: chmod [user/group/others/all]+
[permission] filename
Procedure :
1. Go to any terminal ( or $ prompt ) and type
command ls –l
2. After the list of files and directories is
displayed along with mode of permission ,
now select any file.
3. Change the mode of permission of the
selected file using following command :
$chmod 755 filename
4. Again type ls –l command and now the
permission of the desired file is changed.
PRACTICAL:- 13
OBJECT:- STUDY OF USING SSH COMMANDS.
Command:- ssh -V
Use:- Display ssh client version.
PRACTICAL:- 14
OBJECT:- STUDY OF USING SHUTDOWN
COMMANDS.
Command: sudo -s
Use:- The -s flag causes all subsequent commands to be
entered as if they were preceded by the sudo command.
Command: sudo -k
Use:- The -k flag ends all the current sudo privileges.
Command: sudo -l
Use:- The -l flat lists all the user’s privileges or
checks a specific command.