Quick Reference to space and time questions

Information to find and keep

Are there any naming conventions at your site for temporary files?

____________________________________________

____________________________________________

Are any files automatically deleted by the system? (e.g., those named core, those with a suffix of .backup or .temp, etc.)

____________________________________________

____________________________________________

What filesystems are available for user files on your system?

____________________________________________

____________________________________________

What changes are recommended when the system gets slow? Are there desktop accessories I should disable on an X terminal, applications I shouldn’t run, maximum number of formatting jobs at one time, etc.?

____________________________________________

____________________________________________

____________________________________________

Look at space available and space used

See the disk space available on your system:

    % df

See how much space your home directory and subdirectories take up:

    % du ~

If you want only a grand total, use the -s option:

    % du -s

Look at how big the files are in a directory:

    % ls -l

Do rough comparisons and see which files are the largest.

Clean up your home directory to save space

  1. Get in the habit of creating temporary files with distinctive names—such as names ending in .temp or .tmp, or names beginning with a comma—so that you can quickly delete files that don’t matter.

  2. Delete files named core.

  3. Delete temporary files that weren’t removed after they were created, such as files with a .backup suffix created by FrameMaker or files with a tilde suffix created by Emacs.

  4. Delete files that you can easily recreate. For example, a graphic saved in two formats or Post-Script files only needed for printing.

  5. Delete messages that you don’t need anymore. Sometimes the names of saved files are ambiguous. If you list files by date last modified you can see what files have not been changed in a long time. At our site, the command:

        % ls -lt

    displays files by date modified.

  6. Compress infrequently accessed files to save room. For example to compress the file memo, type:

        % compress memo

    To compress all files in a directory, type:

        % compress *

    To uncompress a file, type:

        % uncompress memo

“Write failed, filesystem is full!”

If you get this error while trying to save a file, the file-system in which the file resides is full; e.g., if you are trying to save a file to /work/memo, this message means the filesystem /work is full.

  1. Delete some files on the /work filesystem and then try to save the file.

  2. Or, save the file to another filesystem. For example, if you know /home is separate from

    /work, save the file to ~/memo.

“No space left on device”

If there is no space in the directory used for edit buffers (e.g., /tmp or /usr/tmp):

  1. Don’t write the file. If you don’t have multiple windows, remember that you can get a system prompt within the editor; e.g., in vi type:

        :!
  2. Check in /usr/tmp with ls -l to see if there are any files there that belong to you.

  3. Remove any unused files owned by you. If there aren’t any such files, or if you’re unsure, then you’ll have to wait for the system administrator to clear up space. Be careful not to delete the file you’re editing!

  4. When there is space again, save your file.

When the system is slow

  1. Look at your own processes:

        % ps -x
  2. Identify resource hogs:

    • Displays that constantly update themselves (like xload or top)

    • Processes that are unwanted

    • Processes running in the background

    • Graphical programs (especially if you have a text alternative)

    • Commands that spawn multiple processes like commands to format troff files

  3. Kill processes by number; e.g., if process number 24912 shown by a ps command is not needed, type:

        % kill 24912

    Or, if your environment supports job control, you can use the jobs command to look for running jobs:

        % jobs

    and kill the job number in the first column (preceded by a % sign):

        % kill %3
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset