UNIX Primer

Home | Primer Home

Why does it keep telling me that my password is incorrect?
Provided that you are properly remembering your password, this means that you are mis-typing your password in some way. In particular, you should make sure that the 'Caps-Lock' is not active on the terminal from which you are trying to log in. Remember, passwords are case-sensitive, so 'apple' is not the same as 'APPLE' or 'ApPlE' or any other capitalization scheme. If your password is still not working, contact CETS to have your password reset.

What does it mean when I get a permission denied error?
This means that the permissions on the file do not allow you to access it. The short version of the story is that in UNIX systems, files can be given various levels of protection with regard to their owner, the 'group' that is associated with them, and with regard to all users on the system. Encountering a permission denied error may mean that you are trying to access something that does not belong to you. For more details about permissions, check out advanced lesson 4 - permissions.

My files are disappearing! Help me!
See the question directly below this one.

What do I do if it says that it can't write a file or that my quota has been exceeded?
If you receive quota warning messages or find yourself unable to write files, your quota might have been exceeded. In addition, you may begin to lose files from your directory if you run certain programs (for instance, a mail program might re-construct your mailbox each time it is run - however, if it cannot write it back to the disk, you will lose your mail file). To fix your quota problems, you need to either remove some files (see lesson 8 - cleaning up) or get your quota raised (see lesson 9 - quotas). Either way, the results can be disastrous if you procrastinate in fixing this problem.

Oh no! I just deleted a file by accident. Can I get it back?
The short answer is, 'no.' Once you delete a file, it's basically gone forever. That is why caution is recommended in using commands that delete files. However, CETS makes regular backups. So, if you are lucky, you might be able to ask them to retrieve an older version of your file for you, but do not count on this! Not only does it not work 99.9% of the time, but it makes the poor workstudy kids in CETS get all cranky. So, again, the best course of action is to never get into this situation in the first place.

Can I change my password?
You most certainly can. You need to use the passwd command.

What is all that stuff that shows up when I type 'ls -l'?
The -l switch tells ls to list long file details, such as file size and permissions. The data will look something like this:
drwx--x--x   2 cse120 other        512 Aug 31 14:38 .
drwxr-xr-x   5 cse120 other        512 Aug 31 14:11 ..
lrwxrwxrwx   1 cse120 other         47 Aug 31 14:37 index.txt
-rw-r--r--   1 cse120 other       7690 Aug 31 14:35 index.html
-rw-------   1 cse120 other       5650 Aug 31 14:18 to_do_list.txt
The data may seem a bit confusing at first, but it is really quite simply organized. The leftmost characters represent a set of permissions for the file. The number next to it indicates how many hard links exist to that file, and should be of little concern to the average user. The two names to the right of it are the names of the file's owner and group, respectively. Next is the file size, the date and time of the last modification, and the file name.

Next, let's look in more detail at the permissions. The leftmost character indicates the type of file (- for a normal file, l for a link, d for a directory). The next three indicate whether the user who owns the file has read, write, and/or execute permissions for that file (r, w and x respectively). The next three represent the same data for the group that the file belongs to, and the final three represent the same data for all users.

For instance, the file labeled index.html may be read and written by the user who owns it (cse120), and read by the group that it belongs to (other) and all other users, whereas to_do_list.txt may only be read and written by the file's owner (cse120). For more information, see the explanation below for the 'chmod' command.

For more detailed information about some of these features, check out advance lesson 7 - links and advance lesson 4 - permissions.

How do I rename a file?
You must use the 'mv' command. Check out lesson 7 - manipulating files for the details.

Designed by D. Kaminsky
Edited by Diana Palsetia
© University of Pennsylvania, 2008