0% found this document useful (0 votes)
27 views18 pages

Oss Practical 1

Uploaded by

piyushupad000
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views18 pages

Oss Practical 1

Uploaded by

piyushupad000
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 18

OSS

PRACTI
TOPIC: 20 BASIC LINUX
CAL 1: COMMAND:

1) COMMAND NAME: pwd


DESCRIPTION – the pwd command prints the current directory
path.
SYNTAX – pwd [option]
PROMPLET - pwd display the logical current directory
OUTPUT EXAMPLE :

2) COMMAND : ls
DESCRIPTION : the ls COMMAND FILE LISTS THE CONTENT OF A
DIRECTORY IT DISPLAYS FILE AND DIRECTORIES WITH THE
CURRENT DIRECTORY BY DEFAULT .
SYNTAX – ls[option]…[file]…
IT MODIFIES THE BEHAVIOUR OF THE COMMAND .
l – LONG LISTING FORMAT .
h – HUMAN READABLE FORMAT .

OUTPUT EXAMPLE :

3) COMMAND NAME : cat


DESCRIPTION : the cat command displays the content of file
SYNTAX – cat [options]…[file]
-n = number all input
-e = display $ at the end of each line

OUTPUT EXAMPLE –
4) COMMAND NAME – head
DESCRIPTION – The Linux head command prints the first lines of
one or more files (or piped data) to standard output.
SYNTAX – head [OPTION]... [FILE]...

-n : specifies the number of line to display


-c : specifies the number of bytes to display
OUTPUT EXAMPLE :

OUTPUT :
5) COMMAND NAME : tail
DESCRIPTION – tail command writes the file specified by the file
parameter to standard output beginning at a specified point . if
no file is specified , standard output is used .

SYNTAX - [ -f ] [ -c Number | -n Number | -m Number | -


b Number | -k Number ] [ File ]

-b read the specified file at beginning at the 512-byte block


location indicated by the Number variable.

c Number Reads the specified file beginning at the byte


location indicated by the Number variable.

OUTPUT EXAMPLE :
6) COMMAND NAME : mv
DESCRIPTION : mv command moves files or direction from one
location to another it can also be used to rename file or
directories.

SYNTAX : mv[option]…[source]…[destination]
I prompts before overwriting files .

OUTPUT EXAMPLES :
7) COMMAND NAME : mkdir
DESCRIPTION : mkdir command creates new directoriy with
specified name .
SYNTAX : mkdir[option]…[directory]

OUTPUT EXAMPLES :
8) COMMAND NAME : cp
DESCRIPTION : cp copies files or directory from one directory to
another
SYNTAX : cp[option]…[source]…[test]
-I prompt
-u copy only when the source file is havier then the destination
file or when the destination file is missing
OUTPUT EXAMPLE :

9) COMMAND NAME : rm
DESCRIPTION : removes the entries for a specified file, group of files, or certain
select files from a list within a directory.
SYNTAX : rm [OPTION]... FILE...

OUTPUT EXAMPLES :

10) COMMAND NAME : gedit


DESCRIPTION : gedit command is used to write small notes and
document.
 SYNTAX : --new-window: Opens a new instance of gedit in
a new window
-version displays the version of gedit
OUTPUT EXAMPLE :

11) COMMAND NAME : man

DESCRIPTION : man COMMAND IS USED TO DISPLAY THE


DOCUMENTATION ON JUST ABOUT ANY LINUX COMMAND CAN
BE EXECUTED ON THE TERMINAL .

SYNTAX : man [ [ [ -c ] [ -t ] [ section ] ] | [ -k | -f ] ] [ -F ] [ -m ] [ -


Mpath ] [ -r ] [ -a ]
OUTPUT EXAMPLE :
12) COMMAND NAME : echo

DESCRIPTION : echo is a built-in Linux command that is used to


display the text passed in as an argument.

Use -e to Add Various Escape Characters

SYNTAX : echo [option] [argument]

OUTPUT EXAMPLE :

13) COMMAND NAME : clear

DESCRIPTION : A clean command is usually included in Linux


package managers which can be used to clear the package

SYNTAX : clear
OUTPUT EXAMPLES :

14) COMMAND NAME : whoami

DESCRIPTION : The whoami command in Linux is used to


display the username of the current user who is logged in:

SYNTAX : whoami [option]

OUTPUT EXAMPLE:

15) COMMAND NAME : wc

DESCRIPTION : command calculates a file's word, line,


character, or byte count
SYNTAX : wc [OPTION]... [FILE]...

OUTPUT EXAMPLE :

16) COMMAND NAME : grep

DESCRIPTION : grep command in Unix/Linux is a powerful tool


used for searching and manipulating text patterns within files.

SYNTAX : grep [options] pattern [files]

OUTPUT EXAMPLES :
17) COMMAND NAME : free

DESCRIPTION : grep command in Linux is a powerful tool used


for searching and manipulating text patterns within files.
-k, –
Displays memory usage in kilobytes
kilo

-m, –
Displays memory usage in megabytes.
mega

-g, –
Displays memory usage in gigabytes.
giga

SYNTAX : free [OPTION]

OUTPUT EXAMPLE :
18) COMMAND NAME : pipe

DESCRIPTION : The pipe command in Linux, represented by the


vertical bar symbol '|' . The primary purpose of the pipe
command is to connect the output of one command directly
into the input of another.

SYNTAX : Command 1 | command 2 | command 3 |

OUTPUT EXAMPLE:

19) COMMAND NAME : ln


DESCRIPTION : this command is used to create shortcut to
other file
SYNTAX : ln [OPTION]... [-T] TARGET LINK_NAME (1st form)
ln [OPTION]... TARGET... DIRECTORY (2nd form)

OUTPUT EXAMPLE:

20) COMMAND NAME : tar


DESCRIPTION : tar command is used to create archive and extract archieve files
SYNTAX : Syntax of `tar` command in Linux
tar [options] [archive-file] [file or directory to be archived]

FLAG:
BRANCH (AI-ML)21 (BATCH 2)

You might also like