How to remove all FIFO files with a shell command
16,718
Solution 1
To delete all FIFOs in the current directory and all sub-folders use
find . -type p -delete
To delete FIFOs only in the current directory use
find . -maxdepth 1 -type p -delete
Solution 2
shell only for current directory...
set -- ./*
for f do
[ -p "$f" ] && rm "$f"
done
Related videos on Youtube
Author by
Nicola
Updated on September 18, 2022Comments
-
Nicola almost 2 years
I can't find a shell command to remove all the FIFO files inside a directory. In fact, for the removal of directories, the
rm
command offers the options-d, --dir
, but for FIFOs it offers no option.For now, the only workaround found is to call the FIFO like
foo.fifo
so that it is easy to remove them withrm *.fifo
.