[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Add --parents option to mv command in order to create parents directorie
Add --parents option to mv command in order to create parents directories
Sun, 28 Apr 2013 18:55:38 +0200
mkdir and cp commands have the --parents option to create parents directories as needed. But this option is missing in mv. One has to create first the directory structure using mkdir --parents and then mv the file. This option is fine for simple moving command, but if one want to move files according to a pattern in a big tree structure, it starts to be too complicate as the directory name should be extracted for almost each moved file.
So another solution is to use the cp --parents command and then delete the original files. But this solution is far from good for all the reasons that differentiate a copy from a move.
So I propose to add a --parents option to mv command in order to create the parents directories as needed. In the case of acceptance, I could write a patch to add this feature.
|[Prev in Thread]
||[Next in Thread]|
- Add --parents option to mv command in order to create parents directories,
Rémy Lefevre <=