Find the answer to your Linux question:
Results 1 to 3 of 3
While reviewing the rm command in the man pages, it specifies that the argument -f will ignore nonexistent files. My question is, what is a nonexistent file, and more specifically, ...
  1. #1
    Just Joined!
    Join Date
    Jan 2010
    Posts
    4

    what is a nonexistent file?

    While reviewing the rm command in the man pages, it specifies that the argument -f will ignore nonexistent files. My question is, what is a nonexistent file, and more specifically, how does it differ from a "file"?

    I cannot seem to find a clear answer about this.

  2. #2
    Linux Engineer GNU-Fan's Avatar
    Join Date
    Mar 2008
    Posts
    935
    Let's say you have to clean up a directory of files on a regular basis.
    The files do always have the same names.

    Soon you will grow tired of manually deleting them, so you write a script like
    rm oddfile1
    rm oddfile2
    ...

    Now if it happens that one of these files that are supposed to be deleted is not there,you would get a warning message: This file I am supposed to delete does not exist.

    The option in question suppresses such messages.
    Debian GNU/Linux -- You know you want it.

  3. #3
    Just Joined!
    Join Date
    Jan 2010
    Posts
    4
    thankyou, I misunderstood and thought that a nonexistent file was a specific type, much like a hidden file.

    Seems silly now

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...