On Sat, 17 Mar 2007 03:12:06 -0500
dwain
what is the command line command to delete a file, directory etc.? The previous posts mentioned both rm (remove a file, but this can also remove a directory tree). rmdir removes an empty directory.
One difference between Unix/Linux systems and other operating systems is
that a file is an entry in a table, called inode. A file may have many
different names (hard and symbolic links). For instance, a directory
will have a minimum or 2 names, the name you see from its parent
directory, and the dot ( . ). Whenever a new hard link is created, it
increments the use count in the inode table. The rm command removes the
file name and decrements the use count, but does not necessarily delete
the file. The system deletes the file, only when the use count reaches
zero. Also, when a program opens a file, the use count is incremented.
One of the things that can happen is that log files are generally
opened by daemons. If you try to delete a large log file, rm will
remove the file name, but the file remains open until either the daemon
closes it or the daemon exits.
--
Jerry Feldman