4 ms·
because he was thinking of doing a rename he expected: mv /path/to/{old_name,new_name} to happen. For people with a mental model of files and directories built
by freshhawk 15y ago
because he was thinking of doing a rename he expected:
mv /path/to/{old_name,new_name}
to happen.
For people with a mental model of files and directories built from using a GUI with windows and folders this does seem to be implementation leakage since you have to know that renaming is moving because of "how the filesystem works". They think of the file name as file metadata and the file contents as the file.
If you have a mental model built around unix-y file management then you probably think of the file path as the file and the fact that renaming and moving are the same thing seems obvious.
- jaylevitt 15y agoAnd even then, knowing that this won't work: mv *.jpeg *.jpg requires yet another mental model, that of a shell and globbing. I've been using UNIX/Linux for 20 years and that still trips me up - because I started in an OS with no shell.