Hacker News new | past | comments | ask | show | jobs | submit login

file is funny, i just did file on standard JS file

  >file main.js 
  >main.js: ASCII C++ program text, with very long lines



Why does file always passive aggressively note the fact that you're using 'very long lines'? I'm not sure it's relevant to the format of the file.


`file` does more than identify the file format; it also looks for properties. It can detect sizes and color properties for most image and video formats, various audio properties for audio formats etc.

"Very long lines" is sort of a property of text files. It means it's unlikely to have been written by hand for one thing.


Hmmm... I'm cynically inclined to believe it's there as a condescending remark about people the authors of file think aren't real hackers because they're not wrapping their lines to 80 characters.


I'm cynically inclined to believe it's there to identify people who can't read the source to discover the cutoff is 300 characters.


But it also has this warning for plain text files - so it's not just about source code where 300 lines is indeed quite long. However 300 characters is very short for a paragraph of text, if you aren't manually wrapping your plain text.


eh, still useful for checking if plaintext or not for those who live in the terminal




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: