We use a temporary file here as the redirection (>) from tail happens before tail is invoked by the shell. If we just redirected straight into the file we would get an empty file.
The sed command can also be used.
sed -i '1d' file.txt
Or using a combination of cat and sed, which needs the same redirection as the tail command above.
Add new comment