DS
Size: a a a
DS
DS
DS
K
DS
AP
E
DS
A=
for file in *.pdf; do touch "${file%.pdf}.txt";done
AP
for file in *.pdf; do touch "${file%.pdf}.txt";done
м
for file in *.pdf; do touch "${file%.pdf}.txt";done
A=
touch file{0001..1000}.pdf
time for file in *.pdf; do touch "${file%.pdf}.txt";done
real 0m4.416s
user 0m1.623s
sys 0m2.082s
---------------------------------
rm *
touch file{0001..1000}.pdf
time ls -1 | grep .pdf | sed 's/.pdf/.txt/g' | while read line; do touch $line; done
real 0m3.847s
user 0m1.576s
sys 0m1.859s
A=
A=
cat dumbfiles.py
#!/usr/bin/env python3
from pathlib import Path
import glob
for file in glob.glob('./*.pdf'):
Path(Path(file).stem + ".txt").touch()
--------------------------------------
touch file{0001..1000}.pdf
time ./dumbfiles.py
real 0m0.284s
user 0m0.141s
sys 0m0.133s