Issue
I have a requirement where i'd like to omit the 1st line from the output of ls -latr "some path"
Since I need to remove total 136
from the below output
src="https://i.stack.imgur.com/OtM9M.png" alt="enter image description here">
So I wrote ls -latr /home/kjatin1/DT_901_linux//autoInclude/system | tail -q
which excluded the 1st line, but when the folder is empty it does not omit it. Please tell me how to omit 1st line in any linux command output
Solution
Pipe it to awk
:
awk '{if(NR>1)print}'
or sed
sed -n '1!p'
Answered By - Fredrik Pihl Answer Checked By - Willingham (WPSolving Volunteer)