-1

Does anyone know how I can get 100 random files from random inode numbers on a /dev/sda2 using php?

random file by inode number, is that possible?

e.g. 56, 1093, 321, 1231, 4231, 512... these numbers are inode numbers pointing to file location randomly. and getting them using php

Sam Wong
  • 11
  • 2
  • 6
  • Why do you ask? What is the purpose? And even if you could do it, there is a major security risk: you would give the user, thru the web, the content of a file which is not supposed to be accessed (e.g. if inside some non-readable directory) – Basile Starynkevitch Sep 14 '13 at 07:44

1 Answers1

1

No, it's not possible. You can only look up files by their path, not by their inode number. (Not all filesystems even have inode numbers.)