11
You will need to change the permissions to rwx for your group. Note that you can only change
permissions on files or directories you own.
GUI: To change the permissions, right-click on the file and choose “Properties." Click on the
tab labeled “Permissions”, and then the “Advanced Permissions” button. Here you can
change the permissions severally where read=“show entries”, write=“write entries”, and
execute=“enter." Then click “OK” to exit “Advanced Permissions." If you are changing
permissions for a directory, you can click the box at the bottom to “Apply changes to all
subfolders and their contents." Click “OK” to apply the changes and exit the “Properties”
menu.
CLI: If you prefer, you may also change permissions in the Konsole window using the chmod
command. Syntax:
chmod (u,g,o)=(r,w,x) <FileName>
[ENTER]
Where u=user, g=group, o=others and (r,w,x) refer to permissions read, write, and execute. If
you are not already in the directory where this file is stored you must either issue a
cd
command to the correct directory or include the entire path name for the file.
Using the example from the previous section, let’s say gu000999 wanted to give the group read
and write permissions to file2. The command for that would be
chmod g=rw file2
. Now gu000999 decides that people in the group shouldn’t be able to
modify or execute file3 and that others should have no permissions. To set read-only
permissions for the group on file3, gu000999 would type
chmod g=r file3
. To remove all
permissions for others, gu000999 would type
chmod o=-rw file3
. Note the minus sign and
note that two separate commands are necessary to issue dissimilar permissions to two user
types. You can issue one command if permissions are the same for two or more user types.
2.4.2.3 Compressing Files
gzip is a compression command. It allows compression of individual files or the contents of
entire directories easily while maintaining the properties of the file (i.e., ownership, creation
date, etc.). A gzipped file will be “renamed” to include a .gz file extension. For example, file
mystuff.log would become mystuff.log.gz once compressed using gzip.
CLI: To compress individual files, open a Konsole window; navigate to the appropriate directory
and at the prompt type
gzip <FileName>
[ENTER].
To compress everything in a directory, type
gzip –r *
[ENTER]
at the prompt. This
recursively goes down through the directory tree compressing all files along the way.
gunzip is just as easy to use. Simply replace gzip with gunzip in the above instructions to undo
the compression.
2.4.3 Searching for Files and Processes
2.4.3.1 Finding Files with “ls”
ls is a Linux command that lists the contents of a directory. Two common uses are (a) discover
if the file the user is looking for is in a certain directory, and (b) to get an overall feel for the
contents of a directory. For example, if after typing
ls
at the prompt, the user is sees a list of
files ending with “.gif” then the user might surmise that this directory is used to store image files.
ls Syntax
ls <options> <DirectoryPath> or <SearchTerm>
When ls is specified alone, then no options are assumed, and files are listed for the current
directory. Typing
ls
at the prompt will simply list the contents of the current directory. Typing a