BASH Shell commands less ( commands for linux )
- January 10, 2024
- Posted by: MainInstructor
- Category: Go
Video Title: BASH Shell commands less ( commands for linux )
Hello and welcome to the Linux speech in today’s tutorial I’m going to show you how to use the les command so let’s get started okay the first step IANA takes to open up your terminal and you can do that using the keyboard shortcut which is holding ctrl alt and pressing T or
You can open up from the GUI okay so the LES command allows you to view the contents of files in much the same way that cat and more allow you to do it but it’s got some extra features so to demonstrate this I’m just going to see
The over to my desktop and as you can see I’ve got a file here called Treasure Island txt and that is the book Treasure Island so there’s definitely going to be a lot of text in there so to start off let’s use the cat command and we’re just going
To cap Treasure Island and hit enter now as you can see it displayed the contents of the file but there is actually a problem and that is the cat has reached one of its limitations which is it doesn’t really deal with large files very well so as you can see this is
Definitely not enough text for a book of this size so let’s just clear the screen and we’re going to use more now more allows you to view the contents of files a page it’s time so what it does is it loads a page at a time so let’s just
Type more in than Treasure Island and see what happens as you can see we’re starting off at the beginning of the book and if we use the spacebar to get down a page at a time you’ll see that there is definitely a lot more text there a lot more so that is actually
Displaying the whole book but it does lack some functionality and features so let’s just use Q to exit out a more and clear the screen and now we’re going to use less so again it’s like less and then your Island and hit enter now as you can
See we’re starting off at the beginning of the book and to scroll down we can go a line at a time using the down / so key or we can use the Enter key to go down the line at a time now to scroll even
Faster and go down a page at a time we can just use the page down button or the spacebar and that will take us down a page at a time and to go up through the document the page at a time we can use B to go back through the
Document one page at a time or we can use page up or to go a line at a time just use the up arrow so that’s how to scroll through the document now let’s just say that we wanted to jump right to the end of it to do that you have to use
An uppercase G so Bridget hold shift and press G takes us right to the end of the document and to go back up to the top you can type 1 and then a capital G which will take you straight to the beginning of the document or you can use a lowercase
G so let’s just go back to the end using a capital G and then a lowercase G to jump right to the beginning again so there we go so that’s how to jump from the beginning of a document to the end and that can be useful if you were
Looking through a document and you knew that the information you were looking for is right near the end you can just capital G and then use page up or the up arrows to go back up through it now to search downwards through the document for keywords or patterns what you can do
Is use the forward slash to tell nest that you want to search for something downwards through the document so we’re at the beginning of the book right now but if we were halfway through the book and we wanted to search through the last half of the book for something then
Would use the forward so I should say forward slash let’s type in a key words a spot as I know this comes up in this book and hit enter there we go it’s found the first occurrence because we were at the beginning of the file and to find the
Next one just hit the N key to find the next occurrences and you can keep doing that and it will keep finding them until there we go it’s found the last one so it says pattern not found which basically means there are no more patterns within the document that match
My search criteria so we just hit enter so that’s how to search downwards through the document from wherever we are now if we just jump to the end we can actually search upwards through a document so if we will say halfway through a document and we knew what we
Were searching for was maybe in the top half of the document rather than jumping to the beginning and then searching down we can actually search up using a question one so you just type a question mark and then what you’re looking for so spot and hit enter and you can use n to
Find the next occurrence so just remember we are working backwards now so it’s going up through the document and you can keep hitting n until pattern your phone so it’s found the last one it is within the document and if we hit enter and just scroll up just to prove
That it was going up is through the document you’ll see that we’re now at chapter 3 and we started off right at the end of the document so that’s how to set up words through a document and finally to exile to bless you just use
The Q key so as you can see less has got a lot more functionality than more and cat when it comes to dealing with larger documents and searching through documents so you could say that less is actually more and that’s part of the reason why it’s
Called les so to find out more about less you can just have a look through the manual pages by typing man les and you’ll see that les has got a ton of extra stuff you can do with that so it’s a really useful command to know and know
How to use so that’s the end of that tutorial on les I hope you found it useful and thanks for watching goodbye
-
Sale!
Wireless WIFI Repeater Extender Amplifier Booster 300Mbps
$29.99$14.99 Add to cartWireless WIFI Repeater Extender Amplifier Booster 300Mbps
Categories: Electronics, Wi-Fi Router, Wireless Wi-Fi Extender Tags: 300Mbps, 802.11N, Amplifier, Booster, Extender, mobile wi-fi booster, Remote, WIFI, Wireless, Wireless WIFI, Wireless WIFI Repeater, Wireless WIFI Repeater Extender, Wireless WIFI Repeater Extender Amplifier, Wireless WIFI Repeater Extender Amplifier Booster, Wireless WIFI Repeater Extender Amplifier Booster 300Mbps$29.99$14.99 -
Sale!
Full RGB Light Design Gaming Headset Headphones with Mic
$24.99$14.99 Add to cartFull RGB Light Design Gaming Headset Headphones with Mic
Categories: Electronics, Gaming, Gaming Headsets Tags: Design, Full, Full RGB Light Design Gaming Headset, Full RGB Light Design Gaming Headset Headphones, Full RGB Light Design Gaming Headset Headphones with Mic, Gamer, Gaming, Gaming Headset Headphones, gaming headset wireless, Headphone, Headphones, Headset, Light, Mic, Package, RGB$24.99$14.99 -
Sale!
Wireless BlueTooth Multi-Device Keyboard Mouse Combo
$39.99$19.99 Add to cartWireless BlueTooth Multi-Device Keyboard Mouse Combo
Categories: Electronics, Gaming, Gaming Keyboards, Keyboard Mouse Combos Tags: Combo, Keyboard, keyboard mouse combos, Mouse, MultiDevice, Set, WireKeyboard Mouse Combo, Wireless, Wireless BlueTooth Keyboard Mouse Combo, Wireless BlueTooth Keyboard Mouse Combos, Wireless BlueTooth Multi-Device Keyboard Mouse Combo, Wireless BlueTooth Multi-Device Keyboard Mouse Combos$39.99$19.99 -
Sale!
High Back Leather Executive Adjustable Swivel Gaming Chair with Headrest and Lumbar
$199.99$139.99 Add to cartHigh Back Leather Executive Adjustable Swivel Gaming Chair with Headrest and Lumbar
Categories: Gaming, Gaming Chairs Tags: Adjustable, Chair, computer chairs, Desk, Executive, Gaming, Girl, Headrest, High, High Back Leather Executive Adjustable Swivel Gaming Chair, High Back Leather Executive Adjustable Swivel Gaming Chair with Headrest, High Back Leather Executive Adjustable Swivel Gaming Chair with Headrest and Lumbar, High Back Leather Executive Adjustable Swivel Gaming Chairs, Leather, Lumbar, Office, Racing, Swivel$199.99$139.99 -
Sale!
Professional LED Light Wired Gaming Headphones with Noise Cancelling Microphone
$29.99$19.99 Select optionsProfessional LED Light Wired Gaming Headphones with Noise Cancelling Microphone
SKU: N/A Categories: Electronics, Gaming, Gaming Headsets Tags: Cancelling, Gaming, Gaming Headphones with Noise Cancelling Microphone, gaming headset, Headphones, Headset, LED, Light, Mic, Microphone, Noise, Professional, Professional LED Light Wired Gaming Headphones, Professional LED Light Wired Gaming Headphones with Noise Cancelling Microphone, Wired, Wired Gaming Headphones, Wired Gaming Headphones with Noise Cancelling Microphone$29.99$19.99 -
Sale!
Gaming Desk with LED Lights USB Power Outlets and Charging Ports
$349.99$249.99 Select optionsGaming Desk with LED Lights USB Power Outlets and Charging Ports
SKU: N/A Categories: Computer Desk, Gaming, Gaming Desk Tags: and Charging Ports, Charging, Desk, Desks, Gaming, gaming desk with led lights, Gaming Desks with LED Lights, Home, LED, Lights, Monitor, Office, Outlets, Port, Power, Room, Stand, USB, USB Power Outlets, White, Workstation$349.99$249.99 -
Sale!
Wired Mixed Backlit Anti-Ghosting Gaming Keyboard
$99.99$79.99 Add to cartWired Mixed Backlit Anti-Ghosting Gaming Keyboard
Categories: Electronics, Gaming, Gaming Keyboards Tags: Antighosting, Backlit, Blue, brown, Gaming, Gaming Keyboard, gaming keyboards, gaming keyboards and mouse, Keyboard, Laptop, Switch, Wired, Wired Mixed Backlit Anti-Ghosting Gaming Keyboard, Wired Mixed Backlit Anti-Ghosting Gaming Keyboards, Wired Mixed Backlit Gaming Keyboard$99.99$79.99 -
Sale!
Wireless Bluetooth 5.3 ANC Noise Cancellation Hi-Res Over the Ear Headphones Headset
$119.99$59.99 Add to cartWireless Bluetooth 5.3 ANC Noise Cancellation Hi-Res Over the Ear Headphones Headset
Categories: Electronics, Gaming, Gaming Headsets Tags: 5.3 ANC Noise Cancellation Hi-Res Over the Ear Headphones Headset, ANC, Audio, Bluetooth, Cancellation, Ear, Earphone, gaming headset, Headphones, Headset, Hi-Res Over the Ear Headphones Headset, HiRes, Noise, Wireless, Wireless Bluetooth 5.3 ANC Noise Cancellation Hi-Res Headphones, Wireless Bluetooth 5.3 ANC Noise Cancellation Hi-Res Over the Ear Headphones Headset, Wireless Bluetooth 5.3 ANC Noise Cancellation Hi-Res Over the Ear Headphones Headsets$119.99$59.99 -
Sale!
Wired Sports Gaming Headset Earbuds with Microphone
$19.99$9.99 Select optionsWired Sports Gaming Headset Earbuds with Microphone
SKU: N/A Categories: Gaming, Gaming Headsets Tags: Accessories, Earbud, Earphone, Earphones, Gaming, gaming headset with microphone, Headphones, Headset, IOS, Microphone, Sports, Wired, Wired Sports Gaming Headset Earbuds, Wired Sports Gaming Headset Earbuds with Microphone, Wired Sports Headset Earbuds$19.99$9.99 -
Sale!
150W Universal Multi USB Fast Charger 16 Port MAX Charging Station
$49.99$29.99 Add to cart150W Universal Multi USB Fast Charger 16 Port MAX Charging Station
Categories: Charging Stations, Electronics Tags: 150W, 150W Charging Station, 150W Universal Multi USB Charging Station, 150W Universal Multi USB Fast Charger 16 Port MAX Charging Station, 150W Universal Multi USB Fast Charger 16 Port MAX Charging Stations, 150W Universal Multi USB MAX Charging Station, 16 Port MAX Charging Station, 3.5A, Charger, Charging, Fast, laptop charging stations, Max, Multi, Port, Stand, Station, Universal, USB$49.99$29.99
These tutorials are so nice!
Just accidently pressed 'h' and I was pleasantly surprised.
Thank you. A very useful tutorial nicely targeted at beginners. I really appreciated this.
Please i need help on the less command. i am currently working on the directory /my_school and i face dificulties using the less command to view the file contain in this my_school folder
my less command is still not going
I was hoping for a less is more joke, needless to say, I wasn’t disappointed.
"less get started"
Thanks for this great tutorial about Less command.
Paolo Maria Guardiani
LIFE!!!!!
SAVER!!!!!
Quite good. One single error: You let display the keys one might press for some actions and for readablility it might be good to use the upper case letters, but it's simply wrong, because — for example in case of searching in less — "n" looks for the next occurance of the search pattern, but "N", upper case, looks for the previous occurance.
i knew you were gonna say less is more xD
good tutorial! thx
Very helpful. Thanks a lot.
thanks bro your videos are awesome !!!