Important catalogs in Rhel
| Position |
Use |
| /usr |
Installed software, shared libraries, including files and static read-only program data. Important sub-directories are: -/usr/bin: User Commands -/usr/sbin: System Administration commands -/usr/local: Native Custom software |
| /etc |
Configuration files for the system |
| /var |
System's variable data, which remains permanent between system startup. dynamically changing files (such as databases, cache directories, log files, printer spool documents, and site content) can be found at/var |
| /run |
Run-time data for the process that was started since the last system startup. This includes the process ID file and the lock file, and so on. Content in this directory is re-created when it restarts. (Integration of/var/run,/var/lock in older versions) |
| /home |
Home directory for ordinary users to store personal data and configuration files |
| /root |
Root's home directory |
| /tmp |
The global writable space used by the temporary file. Files that have not been accessed, changed, or unmodified within 10 days are automatically removed from the directory. Another temp directory/var/tmp, files in this directory are automatically deleted if they have not been accessed, changed, or modified within 30 days |
| /boot |
Files required to start the process |
| /dev |
Contains special device files for the system to access the hardware |
In RHEL7, the following directories have the same content (different content in the old version, and the corresponding symbolic link in the RHEL7):
-/bin and/usr/bin
-/sbin and/usr/sbin
-/lib and/usr/lib
-/lib64 and/usr/lib64
[[Email protected] ~]# CD/[[Email protected]/]# lltotal +lrwxrwxrwx. 1Root root7June - to: -Bin-usr/ binDr-xr-xr-x.3Root root4096June - to: WuBOOTDRWXR-xr-x. -Root root3140June - the:GenevaDEVDRWXR-xr-x.133Root root8192June - the:GenevaETCDRWXR-xr-x.3Root root -June - to: *homelrwxrwxrwx. 1Root root7June - to: -usr/, Lib Liblrwxrwxrwx. 1Root root9June - to: -lib64-usr/ lib64drwxr-xr-x.2Root root6Mar - theMEDIADRWXR-xr-x.2Root root6Mar - theMNTDRWXR-xr-x.4Root root -June - to: theOPTDR-xr-xr-x.138Root root0June - the:GenevaPROCDR-xr-x---. theRoot root4096June - the:GenevaROOTDRWXR-xr-x. *Root root1120June - the:Genevarunlrwxrwxrwx. 1Root root8June - to: -Sbin-usr/ sbindrwxr-xr-x.2Root root6Mar - theSRVDR-xr-xr-x. -Root root0June - the:GenevaSYSDRWXRWXRWT. ARoot root4096June - the: -TMPDRWXR-xr-x. -Root root4096June - to: -USRDRWXR-xr-x. ARoot root4096June - the:Geneva var[[Email protected]/]#
Pattern matching
| Mode |
Matching items |
| * |
Any string consisting of 0 or more characters |
| ? |
Any one character |
| ~ |
Home directory for the current user |
| ~username |
Username User's Home directory |
| ~+ |
Current working directory |
| ~- |
Previous working directory |
| [ABC ...] |
Any one of the characters in brackets |
| [!abc ...] |
Any one of the characters not in parentheses |
| [^abc ...] |
Any one of the characters not in parentheses |
| [[: Alpha:]] |
Any character letter |
| [[: Lower:]] |
Any lowercase details |
| [[: Upper:]] |
Any capital letter |
| [[: Alnum:]] |
Any alphabetic character or number |
| [[:p UNCT:]] |
Any printable character except spaces and alphanumeric |
| [[:d Igit:]] |
Any number |
| [[: Space:]] |
Any whitespace character: May include tab characters, newline characters, or carriage returns, as well as page break and space |
| Comments |
Default POSIX character class: Adjusts for the current region |
RHCE7-Managing files from the command line