Sample Header Ad - 728x90

How to move all files whose contents begin with 0?

0 votes
1 answer
152 views
Here's a command to move all files whose *name* begin with 0 into a folder called zero : mv * zero **Question**: What is a command for moving all files whose *contents* begin with 0 into a folder called zero? Hopefully, there is a short command doing that also. I know that the first character of the contents of a file is given by head -c 1 filename.
Asked by Sebastien Palcoux (103 rep)
Nov 7, 2023, 01:40 PM
Last activity: Nov 8, 2023, 08:20 AM