File Types - DAMTP Computing System FAQ
- I get an error message when creating/writing a file
- How do I know which of my files are taking up the most space.
- I am over quota, is there a quick way to find files that can be deleted
- Which computers have scratch space, where I can store large unimportant files
- How do I find out what type of file a file is
- How do I view a non plain text file
- How can I compress a file?
- How do I convert a file from one type to another
-
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.
-
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 -lswill 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. -
I am over quota, is there a quick way to find files that can be deleted
There is a
cleanupscript 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
cleanupeg prompt before doing anythingcleanup -iand a dummy mode where it just gives a summary of what savings could be expected.cleanup -dummy,man cleanupfor details about the program or see info for what filetypes are considered for removal -
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. -
How do I find out what type of file a file is
The command
filewill take a guess. Usagefile filename -
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.
-
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.
-
How do I convert a file from one type to another
Different programs for different file types, documented in a seperate file.