query: `head -n -1 file > file` erases the contents of the file instead of updating the file
positive_passages.docid: 34802
positive_passages.text: IO redirection and the head command
negative_passages.docid: 29350
negative_passages.text: How to delete an invincible 0 byte file?
negative_passages.docid: 6168
negative_passages.text: How do I delete the first n lines and last line of a file using shell commands?
negative_passages.docid: 122568
negative_passages.text: Can I read and write to the same file in Linux without overwriting it?
negative_passages.docid: 42619
negative_passages.text: How to delete a specific line in a file?
negative_passages.docid: 148786
negative_passages.text: "No such file or directory" when trying to remove a file, but the file exists?
negative_passages.docid: 121289
negative_passages.text: How to make Git "forget" about a file that was tracked but is now in .gitignore?
negative_passages.docid: 121020
negative_passages.text: How do I change how executable files are handled by the file manager?
negative_passages.docid: 106221
negative_passages.text: Remove extra header lines from file, except for the first line
negative_passages.docid: 3662
negative_passages.text: How can I replace a string in a file(s)?
negative_passages.docid: 13396
negative_passages.text: How can I reset or revert a file to a specific revision?
negative_passages.docid: 15892
negative_passages.text: How do I add zero padding to filenames that already have numbers in them?
negative_passages.docid: 88159
negative_passages.text: How to overwrite only part of a file in c++
negative_passages.docid: 71291
negative_passages.text: How can I delete a file named ">"?
negative_passages.docid: 131207
negative_passages.text: Removing the content of a directory recursively
negative_passages.docid: 31314
negative_passages.text: Why does the command shuf file > file leave an empty file, but similar commands do not?
negative_passages.docid: 103372
negative_passages.text: Updating last modified time of a file