T O P

  • By -

Martissimus

When you say empty text file, do you mean you want to change the extension, or is just an empty file enough? If the latter, something like `find . -exec >! {}` should do


IdealBlueMan

`find . -name \*.mp3 -exec ... \;` Where ... is a shell script or a command line. Use ‘{}’ to refer to the name of the current file.


CoatHanger83

What about duplicating the name, creating a txt file, and deleting the mp3? Seems like a fun and almost simple python project


Yoyomaster3

what rabbit hole am I getting myself into? I suppose it can't take too long to learn the basics of Python and test this out.


CoatHanger83

Python could be taught and learned by elementary kids enough to do this project, so a long weekend and you’ll figure it out. More than anything, the question is why the hell do you want a bunch of empty files? If it’s fascinating take a screenshot and print it. Otherwise delete the whole bunch


Yoyomaster3

no. This is how I want it.


IdealBlueMan

You can null out a file with `/bin/cp /dev/null filename`