General chat concerning linux or linuxzoo.
Moderator: drgrussell
-
purpleriverboy
- Posts: 7
- Joined: Mon Oct 19, 2009 7:36 pm
- Are you a robot or a human?: Human
Post
by purpleriverboy » Wed Feb 17, 2010 1:59 pm
When i want to rename a file say 'myfile' to 'newfile'....i have to execute the following command..
$mv myfile newfile
but i dont understand the hidden logic behind this.
I mean, if a command says
'move'
, why does it '
rename
' a particular file or directory.
-
drgrussell
- Site Admin
- Posts: 426
- Joined: Sat Feb 12, 2005 8:57 pm
- Are you a robot or a human?: Human
Post
by drgrussell » Tue Feb 23, 2010 12:16 pm
The "mv" command can do both renaming and moving.
There is often now a command called "rename".
Back in history, frequently used commands were usually just 2 characters long, so I support "mv" was easier to remember than "re".
Who is online
Users browsing this forum: No registered users and 1 guest