Загрузка страницы

Part 4 - Unix/Linux for Testers | head, tail, more & less Commands

Unix/Linux for Testers
head, tail, more & less Commands

You can download free Linux VM Images : https://www.linuxvmimages.com/
Online Linux terminal : https://www.masswerk.at/jsuix/

Notes:
----------
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
--------------------------

#unix #linux

Видео Part 4 - Unix/Linux for Testers | head, tail, more & less Commands канала SDET- QA Automation Techie
Показать
Комментарии отсутствуют
Введите заголовок:

Введите адрес ссылки:

Введите адрес видео с YouTube:

Зарегистрируйтесь или войдите с
Информация о видео
5 декабря 2020 г. 19:30:11
00:29:38
Яндекс.Метрика