Shell Scripting: Getting started with shell scripting

Photo by: adi_scripting
  1. Graphical User Interface or GUI
  2. Command Line Interface or CLI

What is Shell?

What is Scripting?

Pwd : Current Directory
mkdir : Create new directory
cd : Change Directory
Ls : Lists all files in a Directory
ls -la : Lists all files with hidden files
Ls -L : Lists files with size & other details
touch : Create an empty File
mv : Move/rename a file
cp : Copy a file
cp -r : Copy a directory
rm : Delete a file
rm -r : Delete a directory
more : Read the whole file content
tail : Read the last 10 lines, usually for log files
grep : Find pattern or text inside a file
history : History of recently typed commands
top : lists top 10 processes consuming memory
comm : Lists files with details
df & du : Check disk free space & disk used
date : Shows current date/time
uptime : Shows current uptime
finger user : Displays information about
#!/bin/bash
echo "Hey, there! What is your name?"
read name
echo "Nice to meet you, $name"
#!/bin/bashif ["$1" == ""]
then
echo "Oops! You forgot an IP Address"
echo "Syntax: ./ipsweep.sh" 192.168.4"
else
for ip in `seq 1 254`; do
ping -c 1 $1.$ip | grep "64 bytes" | cut -d " " -f 4 | tr -d ":" &
done
fi

--

--

--

Technical mind

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

generators in __init__.py file — Python

The 11th Digest: Qnode.Defi: HOTBIT LISTING POOL

S.O.L.I.D principles in Java

Simple Calculator (with Arduino)

AWS Sync for Two Accounts

Writing a microservice with Spring boot, JAX-RS, and Mongo DB

Three Key Areas to Consider When Making Sense of Serverless Architecture

Top 6 Benefits of Native App Development

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Tania Islam

Tania Islam

Technical mind

More from Medium

How To Identify Log4j Vulnerable Assets In Nessus?

File Descriptors, File Descriptor Tables, and File Structures

Hack The Box: Fawn

How to bounce ATCTS off AD