Lecture 11 Flashcards
FILE SYSTEMS PERMISSION AND UTILITIES
Files and directories are found
through their
path name
path name
describe where a particular file or directory can be found
two methods of controlling who can access a file and how
they can access it
traditional access permissions and ACLs (Access Control Lists
Three types of users can access a file
owner/user, group and other(everyone else)
command to see permissions for files
ls -l
chmod access for all users
a
chmod access for group
g
chmod access for other
o
chmod access for user
u
adding r and removing rx chmod access respectively
+r and -rx
chmod numeric arguments: absolute or relative
absolute
chmod Octal 2: Binary and Permission
010: -w-
chmod Octal 1: Binary and Permission
001: –x
chmod Octal 3: Binary and Permission
011: -wx
chmod Octal 4: Binary and Permission
100: r–
chmod Octal 5: Binary and Permission
101: r-x
chmod Octal 6: Binary and Permission
110: rw-
chmod Octal 7: Binary and Permission
111: rwx
pointer to a file
file link
command for hard link
ln
command for symbolic link
ln -s
difference between hard link and sym link
hard link:
- direct pointer to file
- You can create a hard link to a file only from within the filesystem that holds the
file.
- You cannot create a hard link to a directory
Sym link:
- Indirect pointer to file, a pointer to the hard link to the file
- You can create a symbolic link to a directory
- A symbolic link can point to any file, even one on a different filesystem and to nonexistent files
List directory contents
ls
Create directory
mkdir
Remove an empty directory
rmdir
Copy files
cp
Move or rename files
mv
Delete files/directories
rm
delete non-emtpy directories
rm -r
Create links between files
ln
determine file type
file
display file status
stat
Change access permition
chmod
Change group of file/dir
chgrp
Change owner of file/dir (admin only)
chown
the execution of a command by the Linux kernel
a process
Each Process in the system has a unique
PID ( Process Id) number
system call
the operating system rountine
fork()
causes a process to split in two, parent and child
what is the position of init daemon
PID number 1, similar to root dir in file structure and is the ancestor of all processes
After the user logs in, what process becomes the user’s shell process
login
exec()
causes a process’s image (the entire memory layout) to be replaced by that of a different executable file
In a linux system, 3 utilities lists the users currently logged on?
who, finger and w
You can send messaged to users using what command?
write
to block messages
mesg n
to re-enable blocked messages?
mesg y