Technology Tips

Dan Comden and Rodney
Scholars explore the internet.
DO-IT Scholars Travis, Mitch and Katharine use a macintosh to check email while Carolyn explores the Internet with Gopher.

How do you look at files that are in your account area? Use the ls command to list files in your current directory. Most Unix commands can have what are called switches after them. This is just the dash or hyphen (-) followed by some letter. Unfortunately, it is not very easy to remember which switches do what for which commands other than by rote, as there is no reliable mnemonic system to it.

There are some files in your directory that are hidden, or not viewed, unless you specifically choose to have them listed. Hidden files have a filename that begins with a period, and they are used to remind programs, such as Pine, about your settings and preferences. Usually, you want to leave these files alone without changing, moving, or deleting them. To display these "hidden" files, use the ls command's -a switch: ls -a This will display all the files--hidden or not--in the current directory.

The -l switch will display the size, creator, and permissions of the files: ls -l Another useful switch is -F. Used in conjunction with the ls command, the -F switch yields information pertaining to what a specific entry is. For instance, if something is a directory, there will be a slash (/) after its name. If it is an executable file or application, it will have an asterisk (*) after its name.

Finally, all of these switches can be used in combination: ls -laF This command would display all normal and hidden files in the current directory, as well as their size, creator, and permissions, and whether or not they are directories or programs. This is probably the most useful incarnation of the ls command.

By the way, keep in mind that UNIX is case sensitive--so whereas using the -F (uppercase) switch will yield more information, -f (lowercase) will produce an error message. The -a and -l switches must be in lower case.

There are a lot more things you can to with your directory other than listing the files. Keeping a healthy account area involves periodic maintenance. For example, remove old files with the rm <filename> command. It may be beneficial for you to organize your files into directories, each directory having its own topic. For instance, a "Games" directory. This can be done with the mkdir <directory name> command line.

After creating a directory, you will want to move files into that directory. This would be done with the mv file directory command line. The mv command can also be used to rename a file, without moving it to a different directory: mv oldfilename newfilename.