3 ms·
> No, because you could also rename any shared prefix of file names, not just the parts that end with a slash. I think that $ mkdir -p a/bc; touch a/bc/{d
by JadeNB 12y ago
> No, because you could also rename any shared prefix of file names, not just the parts that end with a slash.
I think that
$ mkdir -p a/bc; touch a/bc/{d,e}
$ cd a; mv bc Bc
(changing just the 'b', not the whole 'bc') amounts to the same behaviour for directories. I guess you could argue that it's different because you still have to mention the `c`, even if you don't change it.
- TheCoelacanth 12y agoWhat if instead of just one file starting with b, you have multiple files starting with b? If there are files with names bc, bd and be, `mv b B` now renames all of those to Bc, Bd and Be. With normal directories, there is no way to do that as one operation.
- JadeNB 12y agoGood point; I understand now.