File Types - DAMTP Computing System FAQ

  1. I get an error message when creating/writing a file
  2. How do I know which of my files are taking up the most space.
  3. I am over quota, is there a quick way to find files that can be deleted
  4. Which computers have scratch space, where I can store large unimportant files
  5. How do I find out what type of file a file is
  6. How do I view a non plain text file
  7. How can I compress a file?
  8. How do I convert a file from one type to another
  1. I get an error message when creating/writing a file

    Check you are still within your quota, use quota .

    If the number of blocks you are using is greater than or equal to your quota number, then you have gone over quota. Try deleting some files, or moving them to a scratch area.

    If you must have some more diskspace, please email help stating how much more you need, why you need it and for how long. Please remember to provide a subject line, eg quota increase.

  2. How do I know which of my files are taking up the most space.

    Use du -sk * to see how big each file in your current directory is.

    /opt/GNU/bin/find ~ -type f -size +4096k -atime +100 -ls will find all files larger then 4M and not read in over 100 days. These numbers can be changed for various situations remembering that 1 Meg = 1024k. On a linux computer, you may need to subsitute /opt/GNU/bin/find with find as they are already using the GNU version.

  3. I am over quota, is there a quick way to find files that can be deleted

    There is a cleanup script for tidying up your disk space. This will look for files like .dvi, where there is a corresponding .tex file, core files, nohup.out etc and remove them if they have not been accessed for at least 7 days It also checks for large files not accessed in a while and compresses these.

    There are options to control cleanup eg prompt before doing anything cleanup -i and a dummy mode where it just gives a summary of what savings could be expected. cleanup -dummy, man cleanup for details about the program or see info for what filetypes are considered for removal

  4. Which computers have scratch space, where I can store large unimportant files

    The list of computers with scratch space is at /usr/damtp/info/scratch. This list includes which group a computer belongs to or if its a public computer (PUB), how much space it has and how much is currently used. The list is updated nightly. There is more information on using scratch space in the getting started section.

  5. How do I find out what type of file a file is

    The command file will take a guess. Usage file filename

  6. How do I view non plain text files

    To view a file that isn't in plain text or is an email attachement you need to open it with a relevant program. See the filetypes table to decide which application to use with your file.

  7. How do I compress a file?

    Use compress, gzip or bzip2. bzip2 normally gives the best compression rate. To uncompress a file use uncompress, gunzip or bunzip2 respectively.

  8. How do I convert a file from one type to another

    Different programs for different file types, documented in a seperate file.