OPERATING SYSTEM_EX1_22I272
OPERATING SYSTEM_EX1_22I272
LAB REPORT-1
EXERCISE -1 VIMALATHITHAN D
07.02.2024 22I272
AIM:
To implement the UNIX commands.
COMMANDS:
1. pwd Command:
The pwd command is used to display the location of the current working directory.
2. echo Command:
The echo command does one simple job: it prints to the output the argument passed to it.
3. clear Command:
Type clear to clear all the previous commands that were ran in the current terminal.
4. cd Command:
Once you have a folder, you can move into it using the cd command. cd means change directory. You
invoke it specifying a folder to move into. You can specify a folder name, or an entire path.
5. mkdir Command:
6. ls Command:
Inside a folder you can list all the files that the folder contains using the ls command.
7. touch Command:
8. cat Command:
9. cp Command:
Using >> you can append the content of multiple files into a new file.
11. mv Command:
Once you have a file, you can move it around using the mv command. You specify the file current path,
and its new path.
The grep command is a very useful tool, that when you master will help you tremendously in your day
to day.
The unzip command is used to extract files from a compressed ZIP archive.
You can compress a file using the gzip compression protocol named LZ77 using the gzip command.
19. gunzip Comment:
The gunzip command is basically equivalent to the gzip command, except the -d option is always
enabled by default.
20. rm Command:
rm is a general command in Unix and other Unix-like systems. It is used to delete objects like symbolic
links, directories, and computer files from the file systems.
The tar command is used to create an archive multiple files in a single file.
The best use case of tail in my opinion is when called with the -f option. It opens the file at the end,
and watches for file changes. Any time there is new content in the file, it is printed in the window.
Type whoami to print the user name currently logged in to the terminal session.
The Linux which command is used to locate the executable files or location of a program from the file
system.
28. rm-r Comment:
The grep filter searches a file for a particular pattern of characters and displays all lines that contain
that pattern.
Calling uname without any options will return the Operating System codename.
32. tree Command:
The tree command is a powerful tool that visually displays the directory structure of a file system in a
tree-like format.
The Linux hostname command is used to view or change a system's domain and hostname.
The env command can be used to pass environment variables without setting them on the outer
environment (the current shell).
35. id Comment:
id command in Linux is used to find out user and group names and numeric ID's (UID or group ID) of
the current user or any other user in the server.
The lspci (list PCI) Linux command displays information about each PCI bus on your system.
lsblk is a command-line utility used for listing block devices on a Linux system.
38. touch Comment:
The lsusb command in Linux is used to display the information about USB buses and the devices
connected to them.
40. vim Comment:
It can be used to find files and directories and perform subsequent operations on them.
The more command reads files and displays the text one screen at a time.
Display the portion of the file that contain the specified tag. This flag works only on files containing
tags created with the ctags command.
Exit Without Parameter After pressing enter, the terminal will simply close.
47. git init Command:
The sleep command is used to hold the terminal by the specified amount of time. By default, it takes time
in seconds.
50. df Command:
The df command is used to display the disk space used in the file system. It displays the output as in the
number of used blocks, available blocks, and the mounted directory.