file information

thomasliju
thomasliju used Ask the Experts™
on
what is the command to find the information about a file in linux

like last executed all info
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Most Valuable Expert 2012
Distinguished Expert 2018
Commented:
>>find the information about a file

Other than when it was last executed, what are you looking for?

ls -al /path/file_name
will tell you permissions, owner, group, size, mod date.

>>like last executed all info

I don't believe there is anything out of the box that tells you that.

You would likely have to turn on auditing.

How you do that likely depends on what flavor of Linux you are using.
You can use 'file' to determine file type or architecture. (32bit or x86_64).
ozo
Most Valuable Expert 2014
Top Expert 2015

Commented:
ls -ld file
stat file

on some systems
lsattr file
or
mdls file

Commented:
Use below command

#file <file>

#ls -laiZ<file>

TY/SA

Author

Commented:
ls -al /path/file_name


helped.

Thank you.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial