![]() Let’s start with a simple renaming in which we are in the directory where the file exists, and we will just rename it right there in the same directory. Just substitute the directory name for the file name, and you will get the same results. It is just that the item usually remains in the same location, but it does not have to.Īs we go through the different scenarios below, I will use examples with a file, but renaming a directory would be the exact same command and process. We are moving it from one name to another. Of course, you can use this command to move a file or directory from one location to another, which is technically what we do when we rename it. We simply use the mv (move) command to rename a file or directory. When working from the command line, most old schoolers like me use the word directory, which we will use for the rest of this article.Īs I mentioned above, Mac’s Terminal application and its shell, Z shell, do not have a rename command. ![]()
0 Comments
Leave a Reply. |