On Wednesday, December 5, 2018 11:51:09 AM CET Ricky Tigg wrote: > OS: *Fedora*. Component: coreutils.x86_64 8.30-6.fc29 @System > > Tail prints the first row in 'tail -n <N>' > > Command executed: > $ dnf repoquery --requires bash --recursive --resolve | grep -E > '.x86_64$|.noarch$' | tail -n 1 > Last metadata expiration check: 0:28:25 ago on Wed Dec 5 11:09:16 2018. > tzdata-0:2018g-1.fc29.noarch > > Expected result: command to only print N rows, which means without printing > the first row.
The line "Last metadata expiration check: [...]" is not printed by tail at all. It is printed by dnf to standard _error_ output. You will see it even if you redirect dnf's standard output to /dev/null: $ dnf repoquery --requires bash --recursive --resolve >/dev/null Last metadata expiration check: [...] You can use `dnf --quiet ...` to suppress the message.