Os Exp2
Os Exp2
FILE COMMANDS:
1. mkdir (Make Directory)
This command is used to create a new directory.
2. cd (Change Directory)
This command changes the current working directory to the
specified directory.
3. ls (List)
Lists the contents of a directory. It can show files, directories, and
sometimes more details depending on the options used.
4. touch
This command is used to create an empty file or update the
timestamp of an existing file.
5. cat (Concatenate)
This command is commonly used to display the contents of a file
to the terminal. It can also concatenate multiple files and display
them together.
6. rm (Remove)
Removes files or directories. With the -r (recursive) option, it can
delete directories and their contents.
7. cp (Copy)
Copies files or directories from one location to another. With the
-r option, it can copy directories and their contents recursively.
8. mv (Move)
Moves or renames files or directories. If the destination is a
directory, the file is moved there; if it’s a new name, the file is
renamed.
9. find
Searches for files and directories within a directory hierarchy
based on various criteria like name, size, modification date, etc.
10. rmdir
Removes an empty directory. It cannot delete directories that
contain files or other directories.
FILTER COMMANDS:
2. comm
comm compares two sorted files line by line and outputs three
columns: lines only in file1, lines only in file2, and lines
common to both files.
3. tr (Translate)
tr is used to translate or delete characters from the input. It
reads from standard input and writes to standard output.
4. wc (Word Count)
wc counts the number of lines, words, and characters in a file
or input stream. It is useful for getting basic statistics about a
text file.
UTILITY COMMANDS:
1. date
The date command displays the current date and time or allows
you to set the system date and time (requires root privileges).
2. ipconfig
The ip command is a powerful utility for configuring and
displaying network interfaces, routes, and tunnels. It replaces
older tools like ifconfig
3. ping
The ping command sends ICMP ECHO_REQUEST packets to
a network host to test connectivity and measure round-trip time
(RTT). It’s a basic troubleshooting tool to check if a host is
reachable.
4. host
The host command performs DNS lookups, converting domain
names to IP addresses and vice versa. It can also provide other
DNS-related information.