Gentoo Archives: gentoo-user

From: Stroller <stroller@××××××××××××××××××.uk>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] detox'ing files by keeping their time stamp?
Date: Sun, 18 Feb 2018 11:38:58
Message-Id: 69A25A16-DA6D-4BF6-A9FF-FF3AAED3FEA3@stellar.eclipse.co.uk
In Reply to: [gentoo-user] detox'ing files by keeping their time stamp? by tuxic@posteo.de
1 > On 18 Feb 2018, at 08:21, tuxic@××××××.de wrote:
2 >
3 > when downloading files from non-UNIX sites, they often contain
4 > "poisonoys" characters like '#', ' ', ''' or that alike.
5 >
6 > With the tool 'detox' those filenames could be fixed.
7 >
8 > But detox changes the time stamp of the files, which
9 > filenames are altered (not all files, which are examined).
10 >
11 > Is there a way to either get detox not to alter the time stamp
12
13 I think:
14
15 tmpfile=/tmp/foo-$RANDOM
16 touch -r "$file" "$tmpfile"
17 detox "$file"
18 touch -r "$tmpfile "$file"
19 rm "$tmpfile"
20
21 It should be trivial to patch detox to do this itself.
22
23 Stroller

Replies