Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

4
  • First, thanks for your reply. When running the command I am getting a head: illegal byte count -- -1 error. Any thoughts on that? I have been paying with the head command but not seeing what is wrong with it. Commented Jun 10, 2016 at 0:52
  • It's probably specific to your version of head. The link also contains other solutions to truncate the last line. Commented Jun 10, 2016 at 0:59
  • 1
    did not function for special characters / spaces in folder names Commented Dec 15, 2020 at 18:55
  • This explicitly disqualifies filenames with spaces, and also filenames that contain special characters, such as tabs, newlines, or any non-printable character (ls -l would show these as ?). Also note that the user is on macOS, which does not generally have GNU tools installed. Commented Mar 3, 2021 at 20:36