Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I know you can find the extension with

file *.myext 

But I'm wondering if I can write into my magic file a line which for example return a success message on all the ".42" ex : myfile.42

imagine a folder with the following files

  • test1.42
  • test2.kk
  • test3.42

what should be the content of my magic file in order to make a success only on test1.42 and test2.42

I tried that for the moment

>0xA2 string 42 success
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
247 views
Welcome To Ask or Share your Answers For Others

1 Answer

linux/unix doesn't care about filename extensions, magic numbers represents first bytes of file which are used to determine type of file.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...