$ls -l total 1962188 drwxrwxr-x 2 amrood amrood 4096 Dec 25 09:59 uml -rw-rw-r-- 1 amrood amrood 5341 Dec 25 08:38 uml.jpg drwxr-xr-x 2 amrood amrood 4096 Feb 15 2006 univ drwxr-xr-x 2 root root 4096 Dec 9 2007 urlspedia -rw-r--r-- 1 root root 276480 Dec 9 2007 urlspedia.tar drwxr-xr-x 8 root root 4096 Nov 25 2007 usr drwxr-xr-x 2 200 300 4096 Nov 25 2007 webthumb-1.01 -rwxr-xr-x 1 root root 3192 Nov 25 2007 webthumb.php -rw-rw-r-- 1 amrood amrood 20480 Nov 25 2007 webthumb.tar -rw-rw-r-- 1 amrood amrood 5654 Aug 9 2007 yourfile.mid -rw-rw-r-- 1 amrood amrood 166255 Aug 9 2007 yourfile.swf drwxr-xr-x 11 amrood amrood 4096 May 29 2007 zlib-1.2.3 $
- First Column: represents file type and permission given on the file. Below is the description of all type of files.
- Second Column: represents the number of memory blocks taken by the file or directory.
- Third Column: represents owner of the file. This is the Unix user who created this file.
- Fourth Column: represents group of the owner. Every Unix user would have an associated group.
- Fifth Column: represents file size in bytes.
- Sixth Column: represents date and time when this file was created or modified last time.
- Seventh Column: represents file or directory name.
| Prefix | Description |
|---|---|
| - | Regular file, such as an ASCII text file, binary executable, or hard link. |
| b | Block special file. Block input/output device file such as a physical hard drive. |
| c | Character special file. Raw input/output device file such as a physical hard drive |
| d | Directory file that contains a listing of other files and directories. |
| l | Symbolic link file. Links on any regular file. |
| p | Named pipe. A mechanism for interprocess communications |
| s | Socket used for interprocess communication. |
File Permission
-rwxr-xr--r : read-4
w : write (modify)-2
e : execute-1
- : no permission-0
rwx wrx xw-
first 3 -owner
second 3 - group
third 3 - others
######################################
Directory permission
chmod
chmod a-x socktest.plThis means that the execute bit should be cleared (-) for all users. (owner, group and the rest of the world) The permissions start with a letter specifying what users should be affected by the change, this might be any of the following:- u the owner user
- g the owner group
- o others (neither u, nor g)
- a all users
chmod 777 /oracle/test.txt
-rwxwrxxwr
#########################################################################
Compress folder using tar command
tar -cvf /db/test.tar /test
if folder size greater then 8GB the use
tar -cvEf /db/test.tar /test
No comments:
Post a Comment