It looks like mtree has a problem with file names containing an asterisk

ef@trave:/tmp/x$ echo foobar >foobar
ef@trave:/tmp/x$ echo 'foo*bar' >'foo*bar'
ef@trave:/tmp/x$ ls -l
total 16
-rw-r--r--  1 ef  wheel  8 Aug 14 17:27 foo*bar
-rw-r--r--  1 ef  wheel  7 Aug 14 17:26 foobar
ef@trave:/tmp/x$ /usr/sbin/mtree -c -p /tmp/x
#          user: ef
#       machine: trave.math.uni-bonn.de
#          tree: /tmp/x
#          date: Thu Aug 14 17:27:17 2025

# .
/set type=file uid=0 gid=0 mode=0644 nlink=1 flags=none
.               type=dir uid=10513 mode=0755 nlink=2 \
                time=1755185194.512283258
    foo\052bar  uid=10513 size=8 time=1755185221.401737966
    foobar      uid=10513 size=7 time=1755185211.763689351
ef@trave:/tmp/x$ /usr/sbin/mtree -c -p /tmp/x >/tmp/x.mtree
ef@trave:/tmp/x$ /usr/sbin/mtree -p /tmp/x -f /tmp/x.mtree
foobar: size (8, 7)
        modification time (Thu Aug 14 17:27:01 2025, Thu Aug 14 17:26:51 2025)
./foobar missing

What the hell?

Reply via email to