What's a handy terminal command you use often?

cybercitizen4@lemm.ee to Asklemmy@lemmy.ml – 218 points –
283

You are viewing a single comment

qmv -f do ${dir}

... for quickly moving and renaming files. The default 'qmv' opens up your preferred text editor with a list of the source and destination name of the directory of files you want to move/rename. The '-f do' tells the command we only want to see/edit the [d]estination [o]nly. If you need to rename/move a bunch of files, it's much quicker to do it in vim (at least for me).

It sounds similar to one of my favorite commands! vidir 🙂

vidir is similar

there's also rename (the perl one, not the shit one). i have fond memories of renaming albums with rename 's/(\d+)/sprintf "%02d", $1/e' so they'd ls in the correct order