Hey Guys.. let's discuss linux today. We are going to learn "Head and Tail Command in Linux" which will give you top 10 and last 10 results from your file. This will help you sort the big files and display only the important content. These are two simple command which come handy when you are going through huge files with lots of content.
-----------------
Syntax:
head [option] [file]
For instance, you want to view the first ten lines of note.txt, located in the current directory:
head note.txt
Below are some options you can add:
-n or –lines prints the first customized number of lines. For example, enter head -n 5 filename.txt to show the first five lines of filename.txt.
-c or –bytes prints the first customized number of bytes of each file.
-q or –quiet will not print headers specifying the file name.
----------------------------
Tail Command:
The tail command displays the last ten lines of a file. It allows users to check whether a file has new data or to read error messages.
Here’s the general format:
tail [option] [file]
For example, you want to show the last ten lines of the colors.txt file:
tail -n colors.txt
----------------------------
For more videos, please hit the LIKE button and SUBSCRIBE to our channel "LET'S LEARN"
_________________________________________________
You can also follow us on social media platforms:
_________________________________________________
Links -
_________________________________________________
⭕ YouTube Channel - / letslearn-in
_________________________________________________
⭕️Follow us on Facebook -
Facebook Link - www.facebook.com/letuslearnindia
_________________________________________________
⭕️Follow us on Instagram -
www.instagram.com/letuslearnindia
_________________________________________________
⭕️Follow us on Twitter -
www.twitter.com/letuslearnindia
_________________________________________________
Sites and other playlists:
✔️Check out our new WordPress site - https://letuslearnindia.wordpress.com/
_________________________________________________
✔️ To Learn more, check out the Playlists -
_________________________________________________
✔️ SQL Tutorial Playlist -
https://www.youtube.com/watch?v=0i991...
_________________________________________________
✔️ CATIA Playlist:
https://www.youtube.com/watch?v=VgBcF...
_________________________________________________
#linux #linuxtutorials #linuxterminal #linux_tutorial #head #tail
#ubuntu #redhat #sort #linuxadministration #unixcommands #sortingdata #shortlinuxvideo
Music I Use: Bensound.com/free-music-for-videos
License code: EQUJZQITQNWJSRPA