On Sat, 17 Mar 2007 03:12:06 -0500 dwain <[EMAIL PROTECTED]> wrote: > 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 <[EMAIL PROTECTED]> Boston Linux and Unix user group http://www.blu.org PGP key id:C5061EA9 PGP Key fingerprint:053C 73EC 3AC1 5C44 3E14 9245 FB00 3ED5 C506 1EA9
signature.asc
Description: PGP signature
