by Ramesh Natarajan on September 8, 2010
Have you wondered why certain programs are located under /bin, or /sbin, or /usr/bin, or /usr/sbin?
For example, less command is located under /usr/bin directory. Why not /bin, or /sbin, or /usr/sbin? What is the different between all these directories?
In this article, let us review the Linux filesystem structures and understand the meaning of individual high-level directories.

1. / – Root
- Every single file and directory starts from the root directory.
- Only root user has write privilege under this directory.
- Please note that /root is root user’s home directory, which is not same as /.
2. /bin – User Binaries
- Contains binary executables.
- Common linux commands you need to use in single-user modes are located under this directory.
- Commands used by all the users of the system are located here.
- For example: ps, ls, ping, grep, cp.
3. /sbin – System Binaries
- Just like /bin, /sbin also contains binary executables.
- But, the linux commands located under this directory are used typically by system aministrator, for system maintenance purpose.
- For example: iptables, reboot, fdisk, ifconfig, swapon
4. /etc – Configuration Files
- Contains configuration files required by all programs.
- This also contains startup and shutdown shell scripts used to start/stop individual programs.
- For example: /etc/resolv.conf, /etc/logrotate.conf
5. /dev – Device Files
- Contains device files.
- These include terminal devices, usb, or any device attached to the system.
- For example: /dev/tty1, /dev/usbmon0
6. /proc – Process Information
- Contains information about system process.
- This is a pseudo filesystem contains information about running process. For example: /proc/{pid} directory contains information about the process with that particular pid.
- This is a virtual filesystem with text information about system resources. For example: /proc/uptime
7. /var – Variable Files
- var stands for variable files.
- Content of the files that are expected to grow can be found under this directory.
- This includes — system log files (/var/log); packages and database files (/var/lib); emails (/var/mail); print queues (/var/spool); lock files (/var/lock); temp files needed across reboots (/var/tmp);
8. /tmp – Temporary Files
- Directory that contains temporary files created by system and users.
- Files under this directory are deleted when system is rebooted.
9. /usr – User Programs
- Contains binaries, libraries, documentation, and source-code for second level programs.
- /usr/bin contains binary files for user programs. If you can’t find a user binary under /bin, look under /usr/bin. For example: at, awk, cc, less, scp
- /usr/sbin contains binary files for system administrators. If you can’t find a system binary under /sbin, look under /usr/sbin. For example: atd, cron, sshd, useradd, userdel
- /usr/lib contains libraries for /usr/bin and /usr/sbin
- /usr/local contains users programs that you install from source. For example, when you install apache from source, it goes under /usr/local/apache2
10. /home – Home Directories
- Home directories for all users to store their personal files.
- For example: /home/john, /home/nikita
11. /boot – Boot Loader Files
- Contains boot loader related files.
- Kernel initrd, vmlinux, grub files are located under /boot
- For example: initrd.img-2.6.32-24-generic, vmlinuz-2.6.32-24-generic
12. /lib – System Libraries
- Contains library files that supports the binaries located under /bin and /sbin
- Library filenames are either ld* or lib*.so.*
- For example: ld-2.11.1.so, libncurses.so.5.7
13. /opt – Optional add-on Applications
- opt stands for optional.
- Contains add-on applications from individual vendors.
- add-on applications should be installed under either /opt/ or /opt/ sub-directory.
14. /mnt – Mount Directory
- Temporary mount directory where sysadmins can mount filesystems.
15. /media – Removable Media Devices
- Temporary mount directory for removable devices.
- For examples, /media/cdrom for CD-ROM; /media/floppy for floppy drives; /media/cdrecorder for CD writer
16. /srv – Service Data
- srv stands for service.
- Contains server specific services related data.
- For example, /srv/cvs contains CVS related data.
Mark一下, 最近发现我的blog打不开了,google了一下才知道被墙了,只能用代理访问了,幸亏代理的速度还不错, 可恶
I 服了 zf。
Mark:今天好像又可以访问啦,hoho。。。。。。。。。。。
使用老版本的xmarks即foxmarks即可突破GFW,不用修改hosts文件, 不用使用代理, 不用折腾自己的FTP服务器。
新版本的xmarks是foxmarks的升级版,xmarks多了社会化分享书签的功能(估计是被河蟹的原因),一般用的也不是很多,对我来说foxmarks就足够了。
下面是解决步骤:
1. 下载foxmarks的最后一个版本 foxmarks 2.7.2
下载地址:https://addons.mozilla.org/zh-CN/firefox/downloads/file/46930/foxmarks_bookmark_synchronizer-2.7.2-fx.xpi
保存到本地foxmarks_bookmark_synchronizer-2.7.2-fx.xpi
2. 用压缩工具(例如7zip)打开下载的xpi文件,用记事本(notepad)修改里面的Install.rdf文件,这是用来解决foxmarks与firefox的版本兼容问题,我现在用的是firefox3.6, 就把3.1b2修改成3.6,保存Install.rdf文件,并把它保存到xpi文件中,压缩工具会有提示。
3. 将修改后的xpi文件安装到firefox3.6中,输入你的用户名和密码, 你的xmarks又可以用了,不过名字变成foxmarks,这无关紧要了。
相信大家都遇到过自己的一些隐私文件不愿意让别人看到的情况吧,怎么解决呢?隐藏起来?换个名字?或者加密?这些办法都可以办到,其实还有一种方法,就是建立一个别人既不能进入又不能删除的文件夹,把自己的隐私文件放进去,别人就看不到啦,下面讲讲如何实现,很简单的。
第一步:在运行中输入cmd,回车,打开命令行窗口。
第二步:在命令行窗口中切换到想要建立文件夹的硬盘分区,如D盘 输入:d:
第三步:输入md 123.. 回车,注意文件夹名后有2个小数点
OK,搞定,看看你的D盘下面是不是多了一个名为123.的文件夹了?它是既不能进入又不能被删除的!不信你就试试看吧^_^
那么,如果自己想删除或者进入这个文件夹,又应该如何操作呢?同样也很简单。
如果想删除,在命令行窗口中输入 rd 123.. 回车,即可删除,当然删除前请确认里面的文件都是不需要的,不要删错了,呵呵。
如果想进入,在命令行窗口中输入 start d:123.. 注意这里一定要是文件夹的绝对路径,否则无法打开即可打开此文件夹,你就可以随心所欲的把不想让别人看到的资料放进去啦!
1. 如果包含的文本中有宽字符集的字体,例如中文,日文,韩文等等,这时候需要设置文件的encoding为utf-8
设置命令 :set encoding=utf-8
2. 设置完成后,如果还是不能正常显示,说明当前的字体不支持,可以通过设置字体解决,由于unicode属于宽字符集,设置gvim的宽字体即可。
设置命令 set guifontwide=DotumChe:h12:cANSI
参考:gvim同时处理中日韩文
使用工具EasyBCD可以很容易的引导你的fedora, 也可以用来生成硬盘安装fedora的引导信息
Note:
如果硬盘安装完你的Fedora,并且不把你的grub信息写到MBR里,而是放到boot目录里,重新启动后可能你的win7也进不去了,不要慌,只要用win7的安装盘,修复你的系统的startup信息即可, 然后使用EasyBCD生成fedora的引导信息,然后重新启动。如果引导时出现找不到mbr文件的话,可以把你的mbr文件的目录修改下,比如直接放到C盘
我的BCD信息:
There are a total of 4 entries listed in the Vista Bootloader.
Bootloader Timeout: 30 seconds.
Default OS: Windows 7
Entry #1
Name: Windows 7
BCD ID: {current}
Drive: C:
Bootloader Path: Windowssystem32winload.exe
Windows Directory: Windows
Entry #2
Name: NeoSmart Linux
BCD ID: {9a4f6d46-0ec2-11df-b7d7-d677b9431b1f}
Drive: C:
Bootloader Path: NSTnst_grub.mbr
Entry #3
Name: grub4dos
BCD ID: {9a4f6d47-0ec2-11df-b7d7-d677b9431b1f}
Drive: C:
Bootloader Path: grldr.mbr
Entry #4
Name: fedora12
BCD ID: {9a4f6d48-0ec2-11df-b7d7-d677b9431b1f}
Drive: C:
Bootloader Path: NSTnst_grub-453B9A387C40DB4FB5FA583E70EE1BC1.mbr
1. MozBackup-1.4.10-EN
MozBackup is a simple utility for creating backups of Mozilla Firefox, Mozilla Thunderbird, Mozilla Sunbird, Flock, SeaMonkey, Mozilla Suite, Spicebird, Songbird and Netscape profiles.
2. Argentum™ Backup
A special backup program, Argentum™ Backup , automatically detects and locates the proper paths, folders and files under any Microsoft Windows (95, 98, ME, NT, 2000, 2003, XP and Vista) platform. Argentum Backup does it for sure, without any mistake or occasion. The developers put a lot of work into the product, tuning and refining the built-in, patented backup engine code-named AutoAnalyze™. Other than that, Argentum Backup is an easy backup software to back up your documents and folders, easily and reliably. Backups are stored in compressed Zip files and can be created both manually and automatically. Argentum Backup is designed to be suitable for both beginners and advanced users.
3. 备份下载软件信息, ftp sites, 讯雷下载列表, flashget下载列表
一个硬盘最多只能有四个主分区:
则四个主分区分别表示为
(hd0,0)
(hd0,1)
(hd0,2)
扩展分区
/* 扩展分区算一个主分区*/
逻辑分区1(hd0,4)
逻辑分区2(hd0,5)
逻辑分区3(hd0,6)
为啥(hd0,4)是指D盘,因为一般我们的电脑 C盘为主分区(特殊安装例外),D盘为第一个逻辑分区,逻辑分区是从 4开始的,因为0,1,2,3为主分区所用。
1硬盘保护程序:
http://drivers.mydrivers.com/download/263-105426-Lenovo-ThinkPad-ThinkVantage-Active-Prot/
2热键标示显示程序
http://drivers.mydrivers.com/download/263-105423-Lenovo-ThinkPad-System-Interface-For-Win/
3 Intel英特尔芯片组Intel Chipset Device Software驱动9.1.1.1015 :
http://drivers.mydrivers.com/download/286-114533-Intel-Intel-Chipset-Device-Software-9.1./
4鼠标驱动程序
http://drivers.mydrivers.com/drivers/263-105430-Lenove-ThinkPad-UltraNav-For-Win7/
5鼠标辅助程序
http://drivers.mydrivers.com/drivers/263-105432-Lenove-ThinkPad-UltraNav-For-Win7-Win7-6/
6 电源管理软件英文版的,不过要比vista版好用的多。ThinkVantage Power Manager
http://drivers.mydrivers.com/drivers/263-105419-Lenove-ThinkPad-For-Win7-Win7-64/
7 电源驱动ThinkVantage Power Management Driver
http://drivers.mydrivers.com/drivers/263-105421-Lenove-ThinkPad-For-Win7-Win7-64/
8指纹识别
http://drivers.mydrivers.com/drivers/263-105413-Lenove-ThinkPad-For-Win7/
9热键驱动程序http://drivers.mydrivers.com/drivers/263-105409-Lenove-ThinkPad-For-Win7-Win7-64/
10四合一读卡器http://drivers.mydrivers.com/drivers/263-105422-Lenove-ThinkPad-Ricoh-For-Win7-Win7-64/
另外需要硬改bios激活win7的朋友, 去bios之家论坛,61 60 400系列都有。
近期评论