About Linux File System
linux 的应用都安装到哪里? (Filesystem Hierarchy Standard)
看分区说明 说是 都装在 /USR下了 也有的说是在那里编译就装在哪里 那RPM软件管理器装的装在哪里? 自己下载然后MAKE INSTALL的默认装在哪里?
编译的时候./configure --prefix=/usr这样的参数可以设置目录
程序确实都是在/usr下。这里有个概念和windows不一样。linux下库文件都是共享的,也就是说可执行程序放一起,然后库文件放一起。windows下是一个程序一个目录,库文件无法共享。所以一个程序可能功能不多,但是程序很大。linux下程序可能非常小。不过依赖某种库。这就靠rpm或者apt或者pacman之类的解决了
/bin或者/usr/bin或者/usr/locale/bin下全部都是可执行程序或者脚本,/sbin,/usr/sbin,/usr/locale/sbin下也是可执行程序,不过都是不常用或者需要root权限程序,/lib,/usr/lib,/usr/locale/lib下都是运行库。
/下一级目录都是基本系统。/usr/下一级目录都是用户的程序文件。发行版不同,可能定义有点不一样,某些发行版不需要/usr/locale这个目录,有些需要。你会发现其实/usr和/下目录很象,/usr/locale也和/usr下目录结构很象
如果整个系统都是你自己编译,你甚至可以不要/usr目录,所有程序都放在/bin,/sbin下都是可以的
.rpm程序里面安装到哪里了是看编译打包的时候定义安装到何处就是何处。.deb也是一样的
有具体命令看包安装到何处了,具体man rpm或者man deb
以上: linux的应用都安装到哪里?
refer: Filesystem Hierarchy Standard/ wiki/ 百科
linux 是由文件组成的, 各个文件不是独立存在的, 相互之间存在依赖关系
What is the difference between a hard link and a symbolic link?
A hardlink isn't a pointer to a file, it's a directory entry (a file) pointing to the same inode. Even if you change the name of the other file, a hardlink still points to the file. If you replace the other file with a new version (by copying it), a hardlink will not point to the new file. You can only have hardlinks within the same filesystem. With hardlinks you don't have concept of the original files and links, all are equal (think of it as a reference to an object). It's a very low level concept.
On the other hand, a symlink is actually pointing to another path (a file name); it resolves the name of the file each time you access it through the symlink. If you move the file, the symlink will not follow. If you replace the file with another one, keeping the name, the symlink will point to the new file. Symlinks can span filesystems. With symlinks you have very clear distinction between the actual file and symlink, which stores no info beside the path about the file it points to.
refer: what-is-the-difference-between-a-hard-link-and-a-symbolic-link