0% found this document useful (0 votes)
22 views5 pages

IoT (KME-553) - Ex-1

Uploaded by

Saurabh Kumar
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)
22 views5 pages

IoT (KME-553) - Ex-1

Uploaded by

Saurabh Kumar
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/ 5

EXPERIMENT 01

OBJECTIVE
Start Raspberry Pi and try various Linux commands in the command terminal window: ls, cd,
touch, mv, rm, man, mkdir, rmdir, tar, gzip, cat, more, less, ps, sudo, cron, chown, chgrp, ping etc.

SOFTWARE/COMPONENTS USED
PC with Raspberry software

1. LS-This command is used in listing contents


inside a directory.
Windows equivalent command - dir Example:

2. CD-We can change the current working


directory to different paths in the system using
this command. Syntax - cd [path] Example:

3. TOUCH- In Linux the touch command is used


to create a new file.
Windows equivalent - Type Nul
Syntax - type nul > filename
Example-

4. MV-mv stands for move, mv is used to


move files or directories from one place
to another in a file system like UNIX.
Windows equivalent- move
Syntax - move source path destination
path Example:
5. RM- It is used to rename a file within the system.
Windows equivalent - ren
Syntax - ren initial filename final filename Example:

6. MAN- man command is used to display the user manual of any command that we can
run on the terminal on Linux. Syntax - $ man [command name] Example:

7. MKDIR - This command is used to create directories.


Syntax - mkdir [name] Example:

8. RMDIR -This command is used to remove a


directory from the system.
Syntax - rmdir [directory name] rmdir \s
[directory name] \s removes all other files
within that directory. Example:

9. TAR - The tar command stands for tape archive, is used to create archive and extract
the archived files.
Syntax - tar [options] [archive-file] [file or directory to be archived]

10.GZIP - This command compresses files in Linux.


Syntax - gzip [options] [filename]
Example - $ gzip mydoc.txt
This will create a zip file mydoc.txt.gz and delete the original file.
11.CAT -This command is used in Linux to read
data from one file and gives their content as
output. It is used to display, read or merge file
content.
Windows equivalent- type command
Syntax - type [filename] Example:

12.MORE -The more command is


used to display the text files in
command prompt
one screen at a time in case
the file is too large.
Syntax - more [options]
[filename]
Example: more -d sample.txt -
d is used to help the user to
navigate.

13.LESS-The less command is a linux


terminal shows a file’s contents
one screen at a time.
Windows power shell equivalent-
head
Syntax- Get-Content filename -head
[number of lines] Example:

14.PS - linux provides a utility called


ps for viewing information related
with the processes on a system
which stands as a abbreviation for
“process status”. It is used to list
the currently running processes
with their PIDs along with some
other information.
Windows equivalent – tasklist command Syntax - tasklist Example:

15.SUDO- sudo (super user do) command in linux is used as a prefix to some commands
that only superuser are allowed to run. This is equivalent to ‘run as administrator’
option in windows.

16.CRON - cron is a software utility offered by linux like operating systems that automates
the scheduled task at a predetermined time.
Sample commands-
00 09-18 ***home/folder/gfg-code.sh
Run/home/folder/gfg-code.sh every hour from 9:00 AM to 6:00 PM every day.

17.CHOWN - chown command is used to


change the file owner or group. Whenever
you want to change ownership you can use
this command.
Syntax - chown [owner name] [file name]
Example: chown master file1.txt

18.CHGRP - chgrp command is used to change the group ownership of a file or directory.
All files in linux belong to an owner or group.
Syntax - sudo chgrp [group name] [file name]
Example: sudo chgrp javatpoint Demo1.txt

19.PING - The ping command is a Command Prompt command used to test the ability of
the source computer to reach a specified destination computer. It's a simple way to
verify that a computer can communicate with another computer or network device.

The ping command operates by sending Internet


Control Message Protocol (ICMP) Echo Request
messages to the destination computer and waiting
for a response. The two major pieces of
information that the ping command provides are
how many of those responses are returned and
how long it takes for them to return.
Syntax- pingIP address/network name/domain name
etc.
Example:

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy