Unix Filesystem Hierarchy Standard:
http://www.pathname.com/fhs/pub/fhs-2.3.html#THEFILESYSTEM
Unix directory structure:
http://en.wikipedia.org/wiki/Unix_directory_structure
View file system hierarchy of Linux:
$ man hier
LinuxFilesystemTreeOverview
https://help.ubuntu.com/community/LinuxFilesystemTreeOverview
http://linuxcommand.org/lts0040.php
Linux 分区方案:
https://help.ubuntu.com/community/DiskSpace
使用 update-rc.d 实现linux服务的开机自启动:(rc stands for Run Commands)
How-To: Managing services with update-rc.d:
http://www.debuntu.org/how-to-manage-services-with-update-rc.d
Ubuntu Manpage: update-rc.d - install and remove System-V style init script links:
http://manpages.ubuntu.com/manpages/hardy/man8/update-rc.d.8.html引用
FILES
/etc/init.d/
The directory containing the actual init scripts.
/etc/rc?.d/
The directories containing the links used by init and managed by
update-rc.d.
/etc/init.d/skeleton
Model for use by writers of init.d scripts.
/var/lib/sysv-rc/legacy-bootsequence
Flag indicating the machine is using legacy mode for boot script
ordering.
使用update-rc.d管理Linux服务:
http://blog.bornin76.com:801/?p=130
关于 /etc/init.d 目录:
http://www.ghacks.net/2009/04/04/get-to-know-linux-the-etcinitd-directory/
下面存放 binary files(二进制可执行文件) 的目录的区别(sbin之s代表system, usr 代表 Unix System Resources):
/bin/
/sbin/
/usr/bin/
/usr/sbin/
/usr/local/bin/
/usr/local/sbin/
http://unix.stackexchange.com/questions/8656/usr-bin-vs-usr-local-bin-on-linux
.profile .bashrc .bash_profile 的区别:
http://superuser.com/questions/183870/difference-between-bashrc-and-bash-profile
/etc/bash.bashrc 和 ~/.bashrc 的区别:
http://superuser.com/questions/49562/whats-the-difference-between-etc-bash-bashrc-and-bashrc-which-one-should-i引用
/etc/bash.bashrc applies to all users
~/.bashrc only applies to the user in which home folder it is.
针对单个用户的 ~/.bash_profile 与 ~/.bashrc 的区别:
http://www.joshstaiger.org/archives/2005/07/bash_profile_vs.html引用
.bash_profile是在登陆时起作用; .bashrc 是交互式non-login shells,即:修改.bashrc后,脚本在新打开的terminal中就开始起作用了,不用重新登陆。
关于 interactive shell / non-interactive shell、login shell / non-login shell,详见:
http://wuaner.iteye.com/blog/1671522
File Descriptors & IO Redirection:
What's File Descriptors? When a UNIX/linux program wants to use a file, it must first open that file. When it does so, UNIX/linux will associate a number with the file. This number, which is used by the program when reading from and writing to the file, is the file descriptor. linux kernal 的 /usr/include/unistd.h 文件中可查看stdin/stdout/stderr三个 fd 的定义:
/* Standard file descriptors. */
#define STDIN_FILENO 0 /* Standard input. */
#define STDOUT_FILENO 1 /* Standard output. */
#define STDERR_FILENO 2 /* Standard error output. */
Understanding File Descriptors and IO Redirection:
http://www.symkat.com/understanding-file-descriptors-and-io-redirection
在 File Descriptors 间做 IO Redirection 时的
&,如 2>&1 ,代表了什么?答案是使用 & 仅仅是为了表明被重定向至的文件(stdin、stdout、stderr都是character devices,unix/linux下 character devices 也是被当作文件file来管理的)是stdout,而不是一个名为 1 的文件,参见:
http://en.wikipedia.org/wiki/Redirection_(computing)引用
In shells derived from csh (the C shell), the syntax instead appends the & (ampersand) character to the redirect characters, thus achieving a similar result. The reason for this is to distinguish between a file named '1' and stdout, i.e. 'cat file 2>1' vs 'cat file 2>&1'. In the first case, stderr is redirected to a file named '1' and in the second, stderr is redirected to stdout.
http://stackoverflow.com/questions/818255/in-the-bash-shell-what-is-21引用
1 is stdout. 2 is stderr.
Here is one way to remember this construct (altough it is not entirely accurate): at first, 2>1 may look like a good way to redirect stderr to stdout. However, it will actually be interpreted as "redirect stderr to a file named 1". & indicates that what follows is a file descriptor and not a filename. So the construct becomes: 2>&1.
分享到:
相关推荐
linux virtual file system
Linux File System Structure (Filed, File, DataBase Record)
Present the data structures in Linux VFS Provide information about flow of control Describe methods and invariants needed to implement a new file system Illustrate with some examples
文件系统可以有不同的格式,叫做文件系统类型(file system types)。这些格式决定信息是如何被贮存为文件和目录。某些文件系统类型贮存重复数据,某些文件系统类型加快硬盘驱动器的存取速度。因此文件系统就是操作...
Linux操作系统是现在流行的一种免费的...在研究了Linux文件系统及网络传输的原理基础上系统主要实现了对文件的管理,包括创建、删除、重命名、复制、移动和文件权限的修改的功能,以及对字符的搜索和对文件的网络传输。
ZFS file system for linux
Google文件系统(Google_File_System)
Linux支持多种文件系统,包括ext2、ext3、vfat、ntfs、iso9660、jffs、romfs和nfs等,为了对各类文件系统进行统一管理,Linux引入了虚拟文件系统VFS(Virtual File System),为各类文件系统提供一个统一的操作界面和...
解析Linux VFS文件系统机制,对Linux文件系统有详细介绍,欢迎大家下载
A Linux kernel, C library, and C compiler overview Basic I/O operations, such as reading from and writing to files Advanced I/O interfaces, memory mappings, and optimization techniques The family of ...
Red Hat Enterprise Linux 5 Global File System
3、linux 内核中没有类 UNIX VFS(Virtual File System) 提供的 struct vnode 结构,那么具体的文件操作是如何与实际文件系统的操作挂钩的?4、超级块(super block)在文件与设备驱动操作中起到的作用?5、在以前的...
NFS為 Network FileSystem 的簡稱,最...不過,如果要達成 Windows 與 Linux 之間的溝通,那麼還是以 SAMBA 比較容易啊!無論如何, NFS 還是可以做為小公司或學校單位內部 Unix Like 機器共享 file 的一個 Server 喔!
Red Hat Enterprise Linux 6 Global File System 2
Red Hat Enterprise Linux 5 Global File System 2
file system source and releated tools
MINIX-File-System 文件系统分析,对想深入了解Linux内核的同志有极大的帮助
memory management, scheduler, file system, and so on are given. A small description of the user-space Linux programming model is also given. The second half of the chapter explains the Linux start-up ...
linux系统搭建 Samba 服务器,实现windows和linux下文件的共享服务,Samba是著名的开源软件之一,可以实现Windows,Linux/UNIX...CIFS(Common Internet File System 通用互联网文件系统)。具有安全,快速,稳定的特点。
liunx文件系统精通指南,对于liunx系统进行详细...-liunx file system versed in the detailed narrative guide for liunx system and learning good liunx. Linux.文件系统精通指南.pdf real6410_android开发板.PDF