head, tail, more & less Commands in Unix/Linux

head : to display specified number of lines from top of the file.


head cities.txt

* Display 10 lines from top of the file.

* 10 is the dfault value for head command

head -n 15 cities.txt  (or)  head -15 cities.txt

head -n 5 cities.txt  

tail : to display specified number of lines from bottom of the file.


tail cities.txt

* Display  last 10 lines from the file.

* 10 is the dfault value for tail command

tail -n 15 cities.txt  (or)  tail -15 cities.txt

tail -n 5 cities.txt   

Display the lines from 10 to 15 ?

head -15 cities.txt | tail -6

Display the lines from 20 to 30 ?

head -30 cities.txt | tail -11

ls - l   Display List of files and directories

ls -l | head -5   Display Top 5 files and directories

ls -l | tail -5   Display Top 5 files and directories

more : Display content page by page.(Next page - space, Next line - Enter,  q- Command prompt)


more cities.txt

more : Display content page by page in both directions means next page or to previos page

Next page - space, Next line - Enter,  q- Command prompt)


more cities.txt

ls -l | more

ls -l | less

touch, pwd & ls Commands in Unix/Linux


ls : List Files 

ls -l   : shows file or directory, size, modified date and time, file or folder name and owner of file and its permission.

ls -a   : view hidden files

touch .myfile.txt

ls -a

ls -l -a : detailed listing files along with hiddwn files

ls -F : will add the ‘/’ Character at the end each directory.

ls -r : display files and directories in reverse order.

ls -R : displays directories along with sub subdirectories

ls -lS : displays file size in order, will display big in size first.

ls -l Documents : list files under directory Documents

wild card characters


? Single character

* Multiple characters

[ ] Range of values

ls ?.*

Output: a.doc  b.doc  c.doc  x.txt  y.txt

ls ?.doc

Output: a.doc  b.doc  c.doc

ls ?.txt

Output: x.txt  y.txt

ls a* Displays files which are starting with 'a'

Output: abc.doc  a.doc

Range(Displays files starting with a to z)

ls [a-z]*.*

ls [a-c]*.*

ls [a-z]*.txt

rm ?.* Removes the files with single character

rm *.txt Removes the files with extension txt

rm *.doc Removes the files with extension txt

Unix/Linux File and Directory Commands



Creating the new file

Display content of the file

Concatenating more than one file

Appending data to the existing file

cp - Copy contents from a file to another file(source to destination)


Renaming a file(changing name of the file)

Renaming a directory

Moves files from one directory to another directory

rm - Delete/remove a file or directory (only if directory is empty).

mkdir - create directories and subdirectories.

mkdir testdir

create multiple directories at one time:

 mkdir testdir1 testdir2 testdir3

create several subdirectories at one time:

 mkdir -p world/countries/states


cd - changing/closing directory

cd ..    : go back to one level

cd /testdir1/testdir2/testdir3 → changing directory

pwd  :  it prints present directory

cd ~     Move to users home directory from anywhere.


rmdir - Remove the directory if it is empty (works only if directory empty)

rmdir world      // error

rm -r world

rmdir testdir1 testdir2 testdir3

Manual & Automation Testing Free Video Tutorials | YouTube Playlists

** How to Prepare for a QA Test Automation Interview


** Project based FAQ's & Resume Preparation


Selenium FAQ’S (8 Parts)


Selenium Locators


Selenium Grid:


ApachePOI API Advanced( for Selenium)


Selenium4 New Features


Git & Github advanced


Java Collections


Java Lambda Expressions


Java Streams


Java Coding FAQ’s








Miscellaneous Topics in Selenium

Ajax/Stale Element Exception: https://www.youtube.com/watch?v=m558zwIM-bU

Robot Class API: https://www.youtube.com/watch?v=jz7MgzNsepI&t=757s

Handle Authentication Popup: https://www.youtube.com/watch?v=cj8z9_c6ejo&t=525s

Automate QR Code: https://www.youtube.com/watch?v=5Ihbu93zxIU&t=693s

Automate Bar Codes: https://www.youtube.com/watch?v=M2cypkjI93c&t=70s

Check Bitmaps/Images: https://www.youtube.com/watch?v=1CBS1AQy6zo&t=717s

Headless browser testing: https://www.youtube.com/watch?v=WqIAcYXaIZA&t=1s

Java script Executor in Selenium: https://www.youtube.com/watch?v=P6LBk_qzISg&t=2625s

DB testing in Selenium (JDBC): https://www.youtube.com/watch?v=Sw3eqsKvfCM

Checking Broken links in page: https://www.youtube.com/watch?v=E0gvFxM6qTw

Use Java HashMap in Selenium: 


Working with Cookies (part1): https://www.youtube.com/watch?v=TjLU9Iq9AeE

Working with Cookies (part2): https://www.youtube.com/watch?v=cv5A4yO8QDo

AutoIT (Part1): https://www.youtube.com/watch?v=wI6hUWcu2Uk

AutoIT (Part2): https://www.youtube.com/watch?v=j22WqyW6PJo

API Testing using Postman


API Testing using SOAPUI


API Testing using RestAssured


JMeter Performance Testing


Manual Testing Full Course


Manual Testing Project


SQL Videos:


Manual Testing + Jira Videos: