Views: 
              18,440ā
          
          
                Votes:  15ā
          
          
                ā
 Solution
          
          
            
            Tags: 
              
                scripts  
              
                sed  
              
                tail  
              
          
          
            
              
                
                Link: 
                  š See Original Question on Ask Ubuntu ā§ š
              
            
          
        
        
          
            URL: 
              https://askubuntu.com/q/862804
          
          
            
            Title: 
              Which is faster to delete first line in file... sed or tail?
            
          
          
            ID: 
              /2016/12/20/Which-is-faster-to-delete-first-line-in-file/Which-is-faster-to-delete-first-line-in-file...-sed-or-tail_
            
          
          
            Created: 
               December 20, 2016
          
          
               Edited:  April 13, 2017
          
          
          
            
            Upload: 
              October 19, 2025
          
          
               Layout:  post
          
          
            
            TOC: 
              false
          
          
               Navigation:  false
          
          
               Copy to clipboard:  false
          
          
        
       
In this answer (How can I remove the first line of a file with sed?) there are two ways to delete the first record in a file:
sed '1d' $file >> headerless.txt
** āāāāā- OR āāāāā-**
tail -n +2 $file >> headerless.txt
Personally I think the tail option is cosmetically more pleasing and more readable but probably because Iām sed-challenged.
Which method is fastest?