Linux
from getting started to running
file type, path problemFile types under Linux All files everything is file
My understanding of everything is that there is no specific file type or suffix. exe. config in linux, this suffix can be understood as artificial for the type of file, but in Linux the system does not consider the file type, it will run directly.
For example, we create a hello.txt file with the echo ' Hello World ' under/app and then change the extension according to the extension under Windows
See what's going to happen.
[[email protected] app] # echo "echo Hello World" >hello.txt [[email protected] app] # ls hello.txt[root@localhost app] # echo Hello world[root@localhost app]#[[email protected] app]# . Hello.txtHello World
We tried to convert the TXT format to. SH and then run to find the results, which could be coincidental.
[[email protected] app] # MV Hello.txt hello.sh [[email protected] app] # Hello World
We'll try to convert the. sh format to. mp3 And then run the discovery results.
This time, because we all know that MP3 is a music media format, according to the logic of Windows will definitely error
But running on Linux without error or display content
[[email protected] app] # MV hello.sh Hello.mp3 [[email protected] app] # ./hello.mp3Hello World
The same is true for converting MP3 to PNG.
[[email protected] app] # MV Hello.mp3 Hello.png [[email protected] app] # Hello World
We're going to remove its extension with a bold idea.
It turns out it's still working.
[[email protected] app] # mv Hello.png Hello [[email protected] app] # ./helloHello World
In the end, I used the wrong way of naming.
And there's no effect on discovery.
[[email protected] app] # mv Hello Hel.fdshfujahjk213sda.sad [[email protected] app] # Hello World
We can conclude that there is no extension under Linux, only file names, so-called extensions are just
The characters that people add to differentiate their files
? -: Normal file *
? D: Catalog File *
? B: Block device
? C: Character device
? L: Symbolic Link file *
? P: Piping File pipe
? S: Socket file sock
Path problem
Absolute path: from ROOT to target
Relative path: relative to parent directory
. For the current path
.. is the parent path, which is the ancestor path
Linux from getting started to running