These lines are list of permissions that are out putted to a user when they use the command ls-1. This is the information about the file, what will be returned is similar to the lines below. Each line describes one file. From left to right each part of line has a specific meaning. These lines can be broken down like this: -The first letter represents the File Type, this tells the file type for example d stands for directory and a – means it is a regular file. -Then the following r’s, w’s, x’s, -‘s and so on are the Permission Mask -The number after the Permission Mask is the Link Count, which is the number of links to the file’s inode -After the Link Count is the User Name, also known as the owner and the log in ID of the user -Followed by the User’s Group, which lets the user what the group from /etc/passwd -The numbers after the User’s Group is the File Size, which is measured in bytes or blocks -There will be a date which is the Creation/Modified Date of the file -Last is the File Name, which is the actual link name
The files and directories can be split up into 3 permissions U, G, and O. -U = User permission -G = Group permission -O = Other Permission
Each permission can be given the right to read (r), write (w), execute (x), or (-) which means no permission or permission is denied. The (r) will allow you to read only, (w) will allow you to create, modify, copy, and delete the file, and (x) will allow you to execute the file and in a directory you can cd into other directories (Echeverria, 2012). -rwxr-xr-- 1 instruct staff 270311 Aug 11 2009 install.sh
This can be identified as a file because it begins with a (-). The first 3 bytes of this line represent the user, which is the owner. The User in this case is (rwx), so in this file the user can read, write, and execute to the file. The second 3 bytes represent the Group. The Group in this case is (r-x), so the Group can read, denied to write, and can execute in the file. The third 3 bytes present the Other. The other in this case is (r--), so the Other can read only, because they are denied access to write and execute. The link count or number of links to the file’s inode is 1. The login ID of the user/User Name is instruct. The User’s Group name is staff. The file size in bytes is 270311. The date it was created or last modified is Aug 11 2009. The file name is install.sh. (Echeverria, 2012) chmod command = chmod 754 install.sh -rw-r--r-- 1 instruct staff 348039 Aug 12 2008 User_Guide.txt
This can be identified as a file because it begins with a (-). The User (rw-) can read, write, and is denied to execute to this file. The Group (r--) can read only to the file and is denied write and execute. The Other (r--) can read only to the file and is denied write and execute. The link count or number of links to the file’s inode is 1. The link count or number of links to the file’s inode is 1. The login ID of the user/User Name is instruct. The User’s Group name is staff. The file size in bytes is 348039. The date it was created or last modified is Aug 12 2008. The file name is User_Guide.txt. (Echeverria, 2012) chmod command = chmod 644 User-Guide.txt -rw-r----- 1 instruct staff 635106 Aug 12 2009 Admin_Guide.txt
This can be identified as a file because it begins with a (-). The User (rw-) can read, write, and is denied to execute to this file. The Group (r--) can read only to the file and is denied write and execute. The Other (---) is denied all access to read, write and execute to this file. The link count or number of links to the file’s inode is 1. The login ID of the user/User Name is instruct. The User’s Group name is staff. The file size in bytes is 635106. The date it was created or last modified is Aug 12 2009. The file name is Admin_Guide.txt. (Echeverria, 2012) chmod command = chmod 640 Admin_Guide.txt drwxr-xr-x 4 instruct staff 144 Aug 12 2009 Documents
This can be identified as a directory because it begins with a (d). The User (rwx) can read, write, and execute to this directory. The Group (r-x) can read, and execute to the directory, but is denied the right to write to the directory. The Other (---) can also read, and execute to the directory, but is denied the right to write to the directory. The link count or number of links to the directory’s inode is 4. The login ID of the user/User Name is instruct. The User’s Group name is staff. The directory size in bytes is 144. The date it was created or last modified is Aug 12 2009. The directory name is Documents. (Echeverria, 2012) chmod command = chmod 755 Documents
-rwsr-sr-x 1 nobody nobody 169202 Aug 11 2009 httpd
This can be identified as a file because it begins with a (-). The User (rws) can read, write, and this file is executed using the account that owns the file, the s permission allows you to take the full identify of the owner. The Group (r-s) can read and execute to the file using the account that owns the file. The Other (r-x) can read, and execute to the file, but is denied the right to write to the file. The link count or number of links to the file’s inode is 1. The login ID of the user/User Name is nobody. The User’s Group name is nobody. The file size in bytes is 169202. The date it was created or last modified is Aug 11 2009. The file name is httpd. (Echeverria, 2012) chmod command = chmod 6755 httpd
Metacharacters/Regular Expressions
A Metacharacter is a character that has a special meaning. They can make many tasks simpler as well allow users to forward data from one command to another. (Echeverria, 2012)
This * means earlier group or character, that recurs 0 or more times. This allows the user to identify a big group of items with a small string. For example the user could want all files that begin with ‘xyz’, use xyz*(Diff, 2011).
This ? means earlier group or character that recurs 0 or one time. This means that ls ???? lists the files that are currently in a file whose names are only four characters long (Diff, 2011).
This ^ means start of a line. The ^ symbol stands for the opposite or not logic. So ls file [^0-9] will list all files that do not start with 0-9 (Diff, 2011).
This $ means end of a line (Diff, 2011).
This […..] means any character between brackets. For example ls [0-9]* will list all files that have 0-9. The shell will expand to any value listed inside the bracket in this case 0-9. The same goes for ls [a-z]*, a list of all files that start with a-z (Diff, 2011).
Regular Expression
To show files that end with txt = ls *txt
To show files that have a 2nd of a and end in sh = ls?a*sh
To show file that starts with # = ls[0-9]*
To show a blank line = ^$
To show a 10 digit telephone number (407) 555-1212 = [^0-9] The #s are in sections (\d[4])(\d[0])(\d[7]) they are shown as ($4) $0-$5. The # will be converted to 4075551212 and then to (407) 456-7890. By modifying the display you can change the 2nd replace meaning (Diff, 2011).
You May Also Find These Documents Helpful
-
4. You are managing a Windows Server 2008 Standard edition which has the File Server role added. You explicitly gave a user “Modify” access to a file. However, when this user tried to append data to that file, he got access denied message. What might be the problem?…
- 603 Words
- 3 Pages
Powerful Essays -
List Folder/Read Data, Read Attributes, Read Extended Attributes, Create Files/Write Data, Create Folders/Append Data, Write Attributes, Write Extended Attributes, Read Permissions,…
- 766 Words
- 4 Pages
Good Essays -
The special character that causes the shell to generate filenames that match any single character in the name of an existing file is _____.…
- 2385 Words
- 10 Pages
Powerful Essays -
2. What would the authorization part of an ls -l listing for filex appear like following setting up the following authorizations?…
- 571 Words
- 4 Pages
Satisfactory Essays -
With a umask value of 112, what are the default permissions assigned to newly created files?…
- 1593 Words
- 7 Pages
Satisfactory Essays -
27. In a command line, what is the purpose of the ? in a filename?…
- 846 Words
- 4 Pages
Good Essays -
1. Is each of the following an absolute pathname, a relative pathname, or a simple filename?…
- 377 Words
- 2 Pages
Satisfactory Essays -
It’s imperative that proper user/groups structures are established. Every user will be a member of the group however; every user won’t be an owner of a group. The owner can change attributes and grant access to files within the group they own.…
- 689 Words
- 3 Pages
Good Essays -
|File – Is a place where data is stored on a computer, there are many different types of files and most if not all data is stored in a file. |…
- 829 Words
- 4 Pages
Satisfactory Essays -
The special character that causes the shell to generate filenames that match any single character in the name of an existing file is _____.…
- 272 Words
- 2 Pages
Good Essays -
The type of access controls and permissions that are probably configured are Modify , Read or Full control.…
- 503 Words
- 2 Pages
Good Essays -
Unit 2 Chapter 5 1) who 3 }cp - copy files and directories mv - move (rename) files you would just basically overwrite the file 4) apropos edit Typical editors are vim, ex, ed and gedit. 8) The which utility displays a message saying that the command you are looking for is not in the list of directories in your search path. For example, $ which me /usr/bin/which: no me in (/usr/bin/which: no me in (/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/home/sam/bin) 10) Approximately 20 Unit 2 Chapter 6 1) 1.Is each of the following an absolute pathname, a relative pathname, or a simple filename? a. milk_co b. correspond/business/milk_co c. /home/max d. /home/max/literature/promo e. .. f. letter.0210…
- 560 Words
- 3 Pages
Satisfactory Essays -
C.1.a) POSIX - a family of standards specified by the IEEE for maintaining compatibility between operating systems.…
- 1383 Words
- 6 Pages
Satisfactory Essays -
Share permissions are typically found on a Share Permissions tab, and NTFS permissions are located on a Security tab. All Windows permission systems use the same interface, although the permissions themselves differ.…
- 2971 Words
- 12 Pages
Satisfactory Essays -
I have placed a (2) behind the file name so we will know what version it is. If anyone does any other edits please use a version number. Thank you all very much for your contribution to this assignment.…
- 3796 Words
- 11 Pages
Powerful Essays