書名: Learn Linux Quickly作者名: Ahmed AlKabary本章字數: 136字更新時間: 2021-06-11 18:43:52
Displaying file inode number
There are two commands you can use to view the inode number of a file:
- ls -i file
- stat file
For example, to view the inode number of facts.txt, you can run the command ls -i facts.txt:
elliot@ubuntu-linux:~$ ls -i facts.txt
924555 facts.txt
And it will spit out the inode number for you. You can also use the stat command:
elliot@ubuntu-linux:~$ stat facts.txt
File: facts.txt
Size: 173 Blocks: 8 IO Block: 4096 regular file
Device: 801h/2049d Inode: 924555 Links: 1
Access: (0644/-rw-r--r--) Uid: ( 1000/ tom) Gid: ( 1000/ tom)
Access: 2019-05-08 13:41:16.544000000 -0600
Modify: 2019-05-08 12:50:44.112000000 -0600
Change: 2019-05-08 12:50:44.112000000 -0600
Birth: -
The stat command doesn't just list the inode number of a file; it also lists all the file attributes as you can see from the command output.
推薦閱讀
- Django+Vue.js商城項目實戰
- Python快樂編程:人工智能深度學習基礎
- ASP.NET MVC4框架揭秘
- Rake Task Management Essentials
- Python語言程序設計
- Android 7編程入門經典:使用Android Studio 2(第4版)
- Learning AWS Lumberyard Game Development
- Getting Started with Python Data Analysis
- D3.js 4.x Data Visualization(Third Edition)
- Jenkins Continuous Integration Cookbook(Second Edition)
- Python編程從0到1(視頻教學版)
- Visual C++開發入行真功夫
- 青少年信息學競賽
- 搞定J2EE:Struts+Spring+Hibernate整合詳解與典型案例
- ScratchJr趣味編程動手玩:讓孩子用編程講故事