LukeSpence.com

Luke's Unix Page

Basic Unix Commands
Unix Commands
vi Editor
 
alias - an abbreviation for a sequence of commands

what does this command do? chmod 754 ~
changes perms on user's login directory user and group can cd into ~ user can add and remove files others can list the file names

what does chmod 754 xzy attempt to do?
if xzy is a ordinary file the intention is to make it readable by everyone executable by members of group and owner
modifiable by owner.  note these take different meanings for directory (vs file)

assume:
-rwxr-xr-- 1 jja faculty 324 Jan 16 16:21 q0
who can do what with q0?
jja can read (or print, cp, etc) change or execute q0
members of group faculty can read or execute q0
everyone else can read q0

1. what does the following command do?
chmod 754 q0

doesnt change perms

2. state any assumptions your answers are based on.

jja only can type chmod (since he is owner).
and has access to the directory

copy this file to your home directory.
answer correctly in the copy.
when done make jja owner of copy.

0. assume:
-rwxr-xr-- 1 jja faculty 324 Jan 16 16:21 q0
who can do what with q0?
jja can read change execute
members of group faculty can read and execute q0
everyone else can read it

1. what does the following command do?
chmod 754 q0

doesnt change its perms
-rwxr-xr-- 1 jja faculty 456 Jan 16 20:54 q0

2. state any assumptions your answers are based on.
access to the directory
only owner can do chmod
 

0. explain in simple terms what the command ln does.

give additional names to a file

1. when do you need the -s option of ln?

if linking to a dir or across devices
(file systems)

Quiz instructions
# we will have quizzes at the beginning of class one per week

cd {<class-dir> go to class directory--use an alias or symbolic link}
class directory is or /accounts/classes/jja/c275

ls -l q? {does the quiz file exist}

cp q? ~ {copy it to your home dir}

cd {return to your home dir}

chmod 600 qN {(N=0,1,2. . .) only you can read/change it}

{take/vi the quiz, score a perfect score}

chown jja qN {(N=0,1,2. . .) make jja the owner}

{After you make jja the owner, the file will remain in your home directory.
You won't be able to read or change it till jja makes you the owner again.
He will do that right after he collects it.}

make sure your login dir is 755 (drwxr-xr-x)
chmod 755 ~

LukeSpence.com