Skip to main content

Questions tagged [file-command]

file - determine file type.

6 votes
1 answer
2k views

Consider this scenario: $ file a b c a: empty b: cannot open `b' (No such file or directory) c: cannot open `c' (No such file or directory) $ file b/c b/c: cannot open `b/c' (No such file or ...
pmor's user avatar
  • 757
2 votes
1 answer
619 views

The file -b <path> command seems useful for scripting (filtering file types, not necessarily by extension). But for that you have to know the actual string output for your target filetype(s) If ...
Jonathan Levin's user avatar
16 votes
3 answers
5k views

Why does file xxx.src lead to cannot open `xxx.src' (No such file or directory) but has an exit status of 0 (success)? $ file xxx.src ; echo $? xxx.src: cannot open `xxx.src' (No such file or ...
pmor's user avatar
  • 757
14 votes
2 answers
1k views

I have a number of files (Jupyter notebooks, .ipynb) which are text files. All of these contain some LaTeX markup. But when I run file, I get: $ file nb_* nb_1.ipynb: ASCII text nb_2....
cheersmate's user avatar
0 votes
0 answers
234 views

A year ago I've used a more advanced version of file, I think this was on a Debian based linux and it was in their main repository. Compared to file, it would show some more information such as if ...
Isa's user avatar
  • 151
17 votes
2 answers
4k views

Consider the shared object dependencies of /bin/bash, which includes /lib64/ld-linux-x86-64.so.2 (dynamic linker/loader): ldd /bin/bash linux-vdso.so.1 (0x00007fffd0887000) libtinfo.so.6 =>...
Shuzheng's user avatar
  • 5,009
0 votes
1 answer
483 views

I'm using cx-Freeze to freeze a PyQt5 application. On my Jenkins slave running OSX 10.13, when cx-Freeze is using the file command to check the type of the files, it classifies a .pyc file (python ...
MindObjects223's user avatar
3 votes
0 answers
655 views

I'm trying to understand the output of the file command when used on an INI-file. I create a file like this ("DOS" line endings are crucial, otherwise it is recognized as an ascii text file) ;Trying ...
johnny's user avatar
  • 2,051
28 votes
6 answers
134k views

I know I can find files using find: find . -type f -name 'sunrise'. Example result: ./sunrise ./events/sunrise ./astronomy/sunrise ./schedule/sunrise I also know that I can determine the file type of ...
Flux's user avatar
  • 3,318
0 votes
1 answer
726 views

When I try to create a C/C++ source file touch test.cpp Usually it will generate a file which type is C source code file. But today I got a plain text file. And I write a simple program in it like: #...
pangbryant's user avatar
2 votes
1 answer
162 views

I used the file command on a c# source file, and linux thought it was a c++ file. What is the reason for this?
J. Czekaj's user avatar
0 votes
5 answers
510 views

So I have a directory where I wish to open the only file in that directory that is human readable. I use file * to print the type of each file, and one file shows as ASCII-text. How can I redirect ...
firedrillsergeant's user avatar
4 votes
1 answer
2k views

I would like to write the format of a drawing with "file drawing" Files start like: CAD A1 mm (Blank after A1) or: CAD A00 m (Blank after "m") I tried somethings like in the file magic: 0 ...
Horst's user avatar
  • 43
1 vote
1 answer
180 views

The file command (Debian Jessie) in does not recognize some Perl modules. For example: /usr/share/perl5/XML/SAX.pm (from libxml-sax-perl) gives: $ file /usr/share/perl5/XML/SAX.pm /usr/share/perl5/...
Wybo Dekker's user avatar
1 vote
1 answer
973 views

I am getting different output while using file command in AIX vs Linux. File contents : D|P_APAC_PH_PHINGTF00240_20150731031225|APAC|PH|NN (L) SPEK DYWIDENDOWYCH RYNKÓW WSCHODZCYCH||4|20130308|PHN|...
GAURAV MAHAJAN's user avatar

15 30 50 per page