0% found this document useful (0 votes)
4 views8 pages

Practical 2

Uploaded by

6.6.6.non.entity
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)
4 views8 pages

Practical 2

Uploaded by

6.6.6.non.entity
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/ 8

Name: Anmol Kumar Sec: 5th (D1) Roll no: 11202667

PRACTICAL - 2

Aim : To study the various utility commands of Linux Operating


System.

$ cal
command is a calendar command in Linux which is used to see the
calendar of a specific month or a whole year.
( shubhdeep@ kali
$ cal
March 2022
su MO Tu we sa

$ cal -y
Shows the calendar of the complete current year with the current date
highlighted.
Name: Anmol Kumar Sec: 5th (D1) Roll no: 11202667

$ date
date command is used to display the system date and time. Date command
is also used to set date and time of the system

$ date -u
-u option displays the time in UTC(Coordinated Universal Time )

$ pwd
pwd stands for Print Working Directory. It prints the path of the working
directory, starting from the root.

$ who
The who command displays information about all users currently on the
local system.

$ echo bless you !


echo command in linux is used to display lines of text/string that are passed
as an argument.
Name: Anmol Kumar Sec: 5th (D1) Roll no: 11202667

$ uname
The command 'uname' displays the information about the system.

$ uname -a
It prints all the system information.

$ uname -n
It prints the hostname of the network node
The Is is the list command in Linux. It will show the full list or content of
your directory. Just type Is and press the enter key.
Name: Anmol Kumar Sec: 5th (D1) Roll no: 11202667
The tty command of terminal basically prints the file name of the terminal
connected to standard input.

$ bc
bc stands for basic calculator. bc command is used for command line
calculators. It is similar to basic calculator by using which we can do basic
mathematical calculation

$ echo "5+5" | bc
Usage of bc with echo

$ clear
clear is a standard Unix computer operating system command that is used
to clear the terminal screen.
Name: Anmol Kumar Sec: 5th (D1) Roll no: 11202667

AIM : To study various file access commands

$ mkdir
The mkdir stands for 'make directory'. With the help of mkdir command,
you can create a new directory wherever you want in your system

$ rmdir

This command is used to delete a directory


Name: Anmol Kumar Sec: 5th (D1) Roll no: 11202667
$ cd
Linux cd command is used to change the current working directory.
The "cd" stands for 'change directory.

$mv
Linux mv command is used to move existing file or directory from
one location to another buzdar@ubuntu:-$ Is esktop Documents
Downloads sample. txt snap Test buzdar@ubuntu:-$ Is -
/Documents/ ample. txt buzdar@ubuntu:-$ mv -b sample. txt —
/Documents/ buzdar@ubuntu:-$ Is —/Documents/ ample. txt
sample. txt-

$ cp
'cp' means copy. 'cp' command is used to copy a file or a directory

[ + ] To copy a file in a different directory


Name: Anmol Kumar Sec: 5th (D1) Roll no: 11202667

$ touch command is a way to create empty files. You can update the
modification and access time of each file with the help of touch command.

$ chmod
Linux chmod command is used to change the access permissions of files
and directories. It stands for change mode
The file permissions in Linux are the following three types:
• Read (r) -4
• write (w) - 2
• execute (x) – 1
$ chmod 777 hello.txt

The above command will give permission to everyone to read, write, and
execute the file.
Name: Anmol Kumar Sec: 5th (D1) Roll no: 11202667
$umask

Simply put, to calculate the permission bits for a new file or


directory, we just subtract the umask value from the default value,
like so.
• 666 - 022 = 644
• 777 - = 755

You might also like