file information

Posted on 2014-02-26
Last Modified: 2014-10-15
what is the command to find the information about a file in linux

like last executed all info
Question by:thomasliju
LVL 76

Accepted Solution

slightwv (䄆 Netminder) earned 500 total points
ID: 39889681
>>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.
LVL 21

Expert Comment

ID: 39890036
You can use 'file' to determine file type or architecture. (32bit or x86_64).
LVL 84

Expert Comment

ID: 39890517
ls -ld file
stat file

on some systems
lsattr file
mdls file
LVL 13

Expert Comment

ID: 39892147
Use below command

#file <file>

#ls -laiZ<file>


Author Closing Comment

ID: 40383651
ls -al /path/file_name


Thank you.

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is the error message I got (CODE) Error caused by incompatible libmp3lame 3.98-2 with ffmpeg I've googled this error message and found out sometimes it attaches this note "can be treated with downgrade libmp3lame to version 3.97 or 3.98" …
I am a long time windows user and for me it is normal to have spaces in directory and file names. Changing to Linux I found myself frustrated when I moved my windows data over to my new Linux computer. The problem occurs when at the command line.…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now