0% found this document useful (0 votes)
6 views

OPERATING SYSTEM_EX1_22I272

Uploaded by

vimalathithan d
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)
6 views

OPERATING SYSTEM_EX1_22I272

Uploaded by

vimalathithan d
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/ 14

OPERATING SYSTEM

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:

You create folders using the 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:

You can create an empty file using the touch command.

8. cat Command:

cat prints a file's content to the standard output.

9. cp Command:

You can copy a file using the cp command.


10. cat with append 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.

12. chmod-w Comment:

Every file in the Linux permission to write.


13. chmod-r Comment:

Every file in the Linux permission to read.

14. grep Comment:

The grep command is a very useful tool, that when you master will help you tremendously in your day
to day.

15. man man Command:


Every time I don't know how to use a command, I type man to get the manual.

16. zip Comment:

The zip comment is both a compression tool and an archiver.

17. unzip Comment:

The unzip command is used to extract files from a compressed ZIP archive.

18. gzip Comment:

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.

21. tar -cf Comment:

The tar command is used to create an archive multiple files in a single file.

22. tar -xf Comment:


The tar command is used to create a grouping multiple files in a single file.

23. head Comment:

Output the first part of a file.

24. tail Comment:

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.

25. who Comment:

The who command displays the users logged in to the system.

26. whoami Comment:

Type whoami to print the user name currently logged in to the terminal session.

27. which Comment:

The Linux which command is used to locate the executable files or location of a program from the file
system.
28. rm-r Comment:

rm -r will recursively delete a directory and all its contents.

29. rmdir Comment:

You can delete a folder using rmdir.

30. ls grep Comment:

The grep filter searches a file for a particular pattern of characters and displays all lines that contain
that pattern.

31. uname Comment:

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.

33. hostname Command:

The Linux hostname command is used to view or change a system's domain and hostname.

34. env Command:

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.

36. lspci Comment:

The lspci (list PCI) Linux command displays information about each PCI bus on your system.

37. lsblk Comment:

lsblk is a command-line utility used for listing block devices on a Linux system.
38. touch Comment:

You can create an empty file using the touch command.

39. lsusb Comment:

The lsusb command in Linux is used to display the information about USB buses and the devices
connected to them.
40. vim Comment:

Vim is a text editor for Unix that comes with Linux.

41. find Comment:

It can be used to find files and directories and perform subsequent operations on them.

42. cat Comment:

Cat is short for concatenate.


43. more Comment:

The more command reads files and displays the text one screen at a time.

44. more|cut -d Comment:

To remove specific delimiters and show the words on a specified position.

45. more| grep -t Comment:

Display the portion of the file that contain the specified tag. This flag works only on files containing
tags created with the ctags command.

46. exit Command:

Exit Without Parameter After pressing enter, the terminal will simply close.
47. git init Command:

The git init command creates a new Git repository.

48. time Command:

The time command is used to display the time to execute a command.

49. sleep 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.

You might also like