simple/truncate/truncate.sh

8 lines
171 B
Bash
Raw Normal View History

2000-08-23 15:03:42 +02:00
#!/bin/sh
@@@find_printf@@@ "$@" -type f -printf '%TY%Tm%Td%TH%TM.%TS %p\n' |
while read timestamp file
do
echo -n "" > "$file"
2000-08-23 15:03:42 +02:00
touch -t "$timestamp" "$file"
done