When configuring an application, you can often use
/dev/null as config file if you want the application to read an empty file. But, if the application reads a list of files from a directory, you cannot use this trick. You would need to give it an empty directory to read.
I was wondering: does Linux have a default empty directory that can be used for such purposes? I know OpenSSH used /var/empty for a while, and I can of course create an empty dir myself, but maybe the FHS has specified a standard directory for this?
/var/emptyis not empty, but contains a folder called
sshd, so you probably don't want to use that.
/dev/nullisn't so much for reading as for writing. Data written to
/dev/nulljust disappears. So, a directory equivalent would be a place where
mv yourfile /dev/emptywould result in deleting your file.
mv yourfile /dev/empty/. If you do
mv yourfile /dev/empty, you're trying to replace the special directory.
ddwill get an EOF before it's even written a single byte. I think you're thinking of
/dev/zero, which is often used to fill something with or generate a specific number of zeros.