Forrest logo
back to the tail tool

file_manipulation:warp:eef3b

Remove the first line of a text file
$ tail -n +2 "$${file_name}"
try on your machine

The command "tail -n +2 "$${file_name}"" is used to display the contents of a file starting from the second line.

Here's a breakdown of the command:

  • "tail" is a command-line utility in Unix-like operating systems that displays the last part (tail) of a file.
  • "-n +2" is an option for the "tail" command, where "-n" specifies the number of lines to display and "+2" indicates to start from the second line.
  • "$${file_name}" is a placeholder for the name of the file that you want to display. The double dollar sign "$$" is used to escape the dollar sign so that it is treated as a literal character and not an indicator for a variable.

So, when you run this command, it will display the contents of the specified file starting from the second line.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the tail tool