Skip to content

Renaming files#

Jeff decided to change their name to Jess. That means we have to rename our file now.

Let's rename the file using the mv command, which actually means move. That's right, we're "moving" the file from one "location" to the next "location". That's technically, sort of true, but we just see it as the filename renaming: mv jeff.txt jess.txt.

Now we get this: ls -lh

1
2
3
michael@develop:~/friends$ ls -lh
total 4.0K
-rw-rw-r-- 1 michael michael 68 Mar 18 09:30 jess.txt

That was easy! Now use nano jess.txt (providing the filename means you can avoid Ctrl+O to open the file - nano opens it for you) and update Jess' name from their previous name of Jeff.