How to identify the attributes of a file from a terminal

Question: How can I know all that attributes de archive available? I mean, I would like to know traditional about a file or directory than what the command Ls -l sample.


Answer: Everything in Unix is ​​files. This includes devices, directories, etc .; in short, everything. Hence the importance of the stats command as it shows the complete status of the file or file system.

For example, to get more information about the log.txt file, run the stat command as shown below.

statlog.txt

The result will be something similar to the following:

File: `/home/youruser/log.txt '
Size: 854 Blocks: 8 IO Block: 4096 regular file
Device: 801h / 2049d Inode: 1058122 Links: 1
Access: (0600 / -rw -------) Uid: (1000 / sathiya) Gid: (1000 / sathiya)
Access: 2009-06-28 19:29:57.000000000 +0530
Modify: 2009-06-28 19:29:57.000000000 +0530
Change: 2009-06-28 19:29:57.000000000 +0530

Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.

  1.   Javier García said

    I like it very useful, thank you very much 😀

  2.   elynx said

    Thanks for the tip!

  3.   kasymaru said

    Interesting one more command for my list!
    Thank you! 🙂

  4.   Anonymous said

    thanks ..!!!