file-mode
setuid-setgid-sticky bit
可执行文件的执行时的两种权限 1.调用文件者的权限 2.文件拥有者的权限 , setuid和setgid可以将文件从权限1提升到权限2
sticky理解为防删除: 拥有x标志的文件权限 1.用户组对目录有删除文件和建立文件的权限 2.用户组对目录只有建立文件的权限,不能删除文件, sticky将用户的x权限限制为s就是从权限1到权限2切换
rwsrw-r– 表示有setuid标志
rwxrwsrw- 表示有setgid标志
rwxrw-rwt 表示有sticky标志
chmod -v u+s filename 4644
chmod -v g+s filename (4+2)644
chmod -v o+t filename (6+1)644
1777 -> 001(u g s) 111(u) 111(g) 111(a)
x+s -> s
s -> S (文件若无可执行权限则显示大写的S, 否则为小写的s,t和T也是相同的道理)
groupadd lfs
useradd -s /bin/bash -g lfs -m -k /dev/null lfs
passwd lfs
chown lfs /dir
1.cfdisk 手动进行分区
2.mkfs.ext3 mkfs -ext3 进行格式化
3.tune2fs -l /dev/sda1 查看分区的详细信息
mkfs.ext3 -b 4096 -i 4096 /dev/sda1 block为4096bytes inode为每4096设置一个
tune2fs -l <device> 查看文件系统信息 -c <count> 设置强制自检的挂载次数 -i <n day> 设置强制自检的间隔时间 -m <percentage> 保留块的百分比 -j 将ext2文件系统转换为ext3格式
关于make mrproper
Linux内核源码根目录下面的makefile中,有很清晰的解释:
help:
@echo 'Cleaning targets:'
@echo ' clean - Remove most generated files but keep the config and'
@echo ' enough build support to build external modules'
@echo ' mrproper - Remove all generated files + config + various backup files'
@echo ' distclean - mrproper + remove editor backup and patch files'
make bootstrap 关于bootstrap
在计算机领域的含义:
The term also applies to the use of a {compiler} to compile itself. The usual process is to write an interpreter} for a language, L, in some other existing language. The compiler is then written in L and the interpreter is used to run it. This produces an {executable} for compiling programs in L from the source of the compiler in L. This technique is often used to verify the correctness of a compiler. It was first used in the {LISP} community.
简单的说,就是自己编译自己,来验证本身的正确性,主要针对编译器,解释性语言等领域.
另外,boot就是bootstrap的缩写。所以“自举”这个词还是很准确的传达了原词的意思的,呵呵。
GCC的make bootstrap选项:
http://gcc.gnu.org/install/configure.html
通过–disable-bootstrap和–enable-bootstrap来禁止和使能bootstrap过程。GCC编译时的bootstrap过程属于第三步,即stage3,通过编译自身来验证编译过程的正确性。