simple/truncate/truncate.sh

8 lines
165 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 > "$file"
touch -t "$timestamp" "$file"
done