What is the command line that displays file informations (or properties), such as in GUI method Display properties in GNOME?

Display properties GNOME

I know that ls -l shows properties; but how to display the same informations?

For example, instead of


we have such GUI rendering:

abdennour@estifeda: $wishedCmd myFile
  Permissions : 
    Owner Access: Read & write 
    Group Access :Read & Write 
    Others Access: Read only

Screenshot of permissions dialogue

  • 13
    What about stat? That will give you a huge amount of information on a selected file or folder; see man stat.
    – user76204
    Oct 8 '13 at 15:33

Use the stat command to know the details of the file. If file name is file_name, use

stat file_name

There is no dedicated command for this. For meta information like time, size and access rights, use

ls -l path-to-file

You might also be interested in what kind of file it is, file path-to-file will help you with that.


Have you tried file?

For example:

file picture.jpg
  • I'm sure he meant permissions.
    – Braiam
    Oct 8 '13 at 15:07

Something like

print_perm() {
  case "$1" in
    0) printf "NO PERMISSIONS";;
    1) printf "Execute only";;
    2) printf "Write only";;
    3) printf "Write & execute";;
    4) printf "Read only";;
    5) printf "Read & execute";;
    6) printf "Read & write";;
    7) printf "Read & write & execute";;

[[ ! -e $1 ]] &&  echo "$0 <file or dir>" 2>&1 && exit 1

perm=$(stat -c%a "$1")

echo "Permissions :"
printf "\tOwner Access: $(print_perm $user)\n"
printf "\tGroup Access: $(print_perm $group)\n"
printf "\tOthers Access: $(print_perm $global)\n"


# rwxr-x--- foo*
> ./abovescript foo
Permissions :
    Owner Access: Read & write & execute
    Group Access: Read & execute
    Others Access: NO PERMISSIONS
ls -lh filename

for human readable version

  • This makes the filesize "readable". You get 32K instead of 31900. But does not help for access rights. But helpful anyway ;-) Jul 12 '19 at 6:02

Display the attributes of the files in the current directory:


List the attributes of files in a particular path:

lsattr path

List file attributes recursively in the current and subsequent directories:

lsattr -R

Show attributes of all the files in the current directory, including hidden ones:

lsattr -a

Display attributes of directories in the current directory:

lsattr -d

  • is there a way to see if the file is a 32 or 64 bit executable? Dec 30 '19 at 16:29
  • In Terminal you can use : `` objdump -f file.exe `` you'II see file format output like this : ` `` file.exe: file format pei-i386 architecture: i386, flags 0x0000..: EXEC_P, HAS_DEBUG, D_PAGED start address 0x00402.... `` So file format pei-i386 => 32bit Other method to check out what format the executable file has. using ` file ` command as example: `` $ file myfile.exe `` response > myfile.exe: PE32 executable (GUI) Intel 80386, for MS Windows ```
    – Bou Said
    Jan 9 '20 at 1:47
  • I tried the objdump way first and got "file format not recognized" then when I used the file command got "POSIX shell script, ASCII text executable, with very long lines" Jan 9 '20 at 1:57

You can use ls command to list files and their properties by adding the -l option. Example:

$ls -l filename


ls -l filename

(use small L)


As described in the Linux Pocket Guide by Daniel J. Barrett you can list extended attributes of files and directories with:

lsattr file_name

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.