-
You can't undelete files under UNIX. You need to send mail to help
and ask for a restore. Files are 'checkpointed' a couple of times per
day, so in any case you will may lose serveral hours worth of
work if you accidentally remove a file. The operator needs the
following information to process your restore request:
- your username
this should be in the mail headers unless you're sending mail from someone
else's account.
- the machine you deleted the file(s) on
You need to specify this in your message. The operators cannot generally
assume what's in your mail headers is correct.
- when you deleted the file(s)
This needs to be a time as close to exact as you can manage
- when you last modified the file(s)
- the name of the file(s)
You need to include some reasonable specification of the files, like
"myprog.c in my home directory on remus" , "math:~me/thesis/*.tex", or
"everything in the directory paul:~me/News/rec/pets/cats".
Without all of this information, with the possible exception of the last
modified date, the operator will not be able to restore your file and
will return your message asking for more information.
-
~ is expanded by the shell into your home directory if it begins a
word. You need to rewrite the command so that the ~ does not begin a word:
rm ./~foo
-
This is documented in the manpage for rm. Both of the following
work:
rm ./-foo
rm -- -foo
-
If you are on an xterminal, you can't. If you are on the console of a
Sun running SunOS 4, you can use either /usr/demo/SOUND/play or
/usr/local/bin/play. If you are on the console of a Sun running
SunOS 5, you can use /bin/audioplay.
-
For the most part, you can use the file command to find out what
kind of file a file is:
remus: ~> file T101979-05.tar.gz
T101979-05.tar.gz: gzip compressed data
remus: ~> file dangerous-fork-patch
dangerous-fork-patch: executable /sbin/sh script
remus: ~>
You can also get a clue from the extension (although UNIX doesn't generally
enforce any kind of file naming convention). Here are some common ones:
Extension Comments
--------- --------
.tar tar
.Z compress/uncompress/zcat
.gz gzip/gunzip/zmore
.cpio cpio
.uu or .uue uuencode/uudecode
Note that you may have a file called foo.cpio.gz, which means you need to
use gunzip to extract foo.cpio, and then cpio to extract the contents of
that.
-
There are two programs you can use to compress files, gzip and
compress. gzip almost always gives better compression,
but compress is a little more widely available. See the manpages
for both commands for usage information.
-
When you edit a file with emacs, it creates a backup file in case you
want to undo changes. emacs names the file foo~. Rutgers
changed emacs (don't ask me why, you don't want to know) to make
backup files called foo.BAK. Either way, they are backup files,
and you can delete them if you don't want them.
emacs also creates checkpoint (autosave) files, called #foo#
(or foo.CKP in old Rutgers emacs). These are similar to backup
files.
-
Your quota is a limit of how much disk space you can use. You actually have
two limits, a soft limit and a hard limit (I'm ignoring inode quotas here).
The system will not let you exceed your hard limit. The system will let you
exceed your soft limit, but will print warning messages. If you stay over
your soft limit for more than 7 consecutive days, it will "expire", and
the system will enforce it as if it was a hard limit. If you need
more disk quota, please send mail to help telling us why you need the
extra space. Generally no reasonable request is refused.
To find out how much quota you have and how much you are using, you can
use the command quota -v. To find out how much space each thing
in your account is using, use ls -as or du.
-
If your quota becomes "expired", the system will enforce your soft limit
as a hard limit. No files will be deleted, but you will not be able to
create new files or extend existing ones. You need to fix this by removing
some files.
-
If the disk you are on is full, you may not be able to create or extend files,
even though you haven't used all of your quota. You can find out how much
free space is left on the disk with df. Note that the system keeps
10% of the filesystem free for system purposes, so you should use the
%free column from df, not the blocks free/blocks used columns.