View files inode number using ls command

Configuration for GNU Linux Fedora Computer using Linux Command


     The ls command usually used to list directory contents, beside list files inside the directory, the ls command with option -i can be use to view files inode number (files index number).  The command example below show the use of ls commnad option -i to view files inode number and directory inode number.

The command example below, show the ls command is invoke without any option to list all the files inside directory.

List Linux files and directory

[fedora@fedora ~]$ ls

Desktop Download Pictures Templates this_is_directory

Documents Music Public testcopy.txt Videos

[fedora@fedora ~]$


The command example below still use the ls command but this time we use the ls command with option -i.  The ls command with -i, list files and directory and then print the inode number for each file/directory.

View inode number information using ls command

[fedora@fedora ~]$ ls -i

35963 Desktop 35968 Music 35965 Templates 35970 Videos

35967 Documents 35969 Pictures 471358 testcopy.txt

35964 Download 35966 Public 573259 this_is_directory

[fedora@fedora ~]$