Directory added to /dev -- can I delete it?

I booted my 13.2 box, forgot there was a USB thumbdrive still in it. Got some message (forgot what), removed the USB-drive and rebooted. All fine.

Now I have a /dev/enc@n3061686369656d30 directory with a bunch of subdirectories.

/var/log/messages gives that I booted my box at 15h48. The 'enc@...' tree was made the minute before, which suggests that it was made at the moment I tried the first boot described above.

Can I safely remove this 'enc@...' directory and subdirectories?

Why does # rm -rf /dev/enc@... not work? "rm: Operation not supported"

TIA,
 
Everything in /dev is normally created at boot-time by kernel or init scripts.
So anything in it can be deleted as it does not survive reboot. Deleting mostly does "nothing".
 
In the old days, /dev was a real directory in a real file system, typically the root file system. Entries in it were device nodes, which are sort of like files, except IO to them goes to the underlying device. The important thing was the major and minor device number of the device nodes; their file names were mostly just a convention. For example, if you had a modem connected to serial port called /dev/tty123, you could rename it to /dev/purple_flying_elephant, and then open it with "cu -s 19200 -l /dev/purple_flying_elephant", and it would work just fine. In those days, some people would create directory structures in their /dev to keep things neatly organized.

Today, that has all ceased to exist. /dev/ is a pseudo file system, which is automatically populated by device discovery. You can't create files or device nodes in there, nor delete them: they show up and leave spontaneously when the kernel finds or loses devices. The operations to create and delete files and directories in there all give "not supported" errors, to indicate that this is not a place that humans should mess around in.
 
I notice it also appears in diskinfo -v /dev/ada0

ahcich0 # Attachment
id1,enc@n3061686369656d30/type@0/slot@1/elmdesc@Slot_00 # Physical path

So I would say it is where AHCI stores enumerated disk information.
 
Back
Top