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

OS Assignment No. 3

The document discusses several common Linux commands including cat, man, find, grep, mkfifo, tee, and wc. Cat is used to create, view, and concatenate files. Man displays the manual for commands, find searches for files and folders, and grep searches files for patterns. These commands are fundamental Linux utilities for working with files, viewing documentation, and searching content.

Uploaded by

Usman Zafar
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)
155 views8 pages

OS Assignment No. 3

The document discusses several common Linux commands including cat, man, find, grep, mkfifo, tee, and wc. Cat is used to create, view, and concatenate files. Man displays the manual for commands, find searches for files and folders, and grep searches files for patterns. These commands are fundamental Linux utilities for working with files, viewing documentation, and searching content.

Uploaded by

Usman Zafar
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

LINUX COMMANDS

Operating Systems

JUNE 21, 2020


USMAN ZAFAR | MITE-F18-015
Superior University Lahore
Use of Linux Commands

1. CAT

The cat command (short for “concatenate “) is one of the most frequently used command
in Linux/Unix, Apple Mac OS X operating systems. cat command allows us to create
single or multiple files, view contain of file, concatenate files and redirect output in
terminal or files. It is a standard Unix program used to concatenate and display files. The
cat command display file contents to a screen. Cat command concatenate FILE(s), or
standard input, to standard output. With no FILE, or when FILE is -, it reads standard
input. Also, you can use cat command for quickly creating a file. The cat command can
read and write data from standard input and output devices. It has three main functions
related to manipulating text files: creating them, displaying them, and combining them.

Screen Short.
2. MAN

man command in Linux is used to display the user manual of any command that we can
run on the terminal. It provides a detailed view of the command which includes NAME,
SYNOPSIS, DESCRIPTION, OPTIONS, EXIT STATUS, RETURN VALUES,
ERRORS, FILES, VERSIONS, EXAMPLES, AUTHORS and SEE ALSO.

Screen short

here I use MAN date command to display the manual of Date commad.
3. FIND

The find command in UNIX is a command line utility for walking a file hierarchy. It can
be used to find files and directories and perform subsequent operations on them. It
supports searching by file, folder, name, creation date, modification date, owner and
permissions. By using the ‘-exec’ other UNIX commands can be executed on files or
folders found.

Screen Short

4. GREP

The grep filter searches a file for a particular pattern of characters, and displays all lines
that contain that pattern. The pattern that is searched in the file is referred to as the
regular expression (grep stands for globally search for regular expression and print out).
Screen Short

5. MKFIFO

If you are also a moderate Linux demand line individual, you should be conscious of
pipelines, a command that is fundamental feature that allows processes to communicate.
Then there’s a concept of named pipes (yeah, pipes with names, so that you can do more
with pipes). The mkfifo command lets you create such named pipes.

Screen Short
6. TEE

tee command reads the standard input and writes it to both the standard output and one
or more files. The command is named after the T-splitter used in plumbing. It basically
breaks the output of a program so that it can be both displayed and saved in a file. It
does both the tasks simultaneously, copies the result into the specified files or variables
and also display the result.
Screen Short
7. WC

wc stands for word count. As the name implies, it is mainly used for counting purpose.
It is used to find out number of lines, word count, byte and characters count in the files
specified in the file arguments.

You might also like