LESSON 4 of 5//File Operations
Moving and renaming with mv
The mv command serves double duty — it moves files to a new location AND renames files. The syntax is the same: mv source destination.
Moving and renamingzsh // interactive
# Rename a file
➜~mv old-name.ts new-name.ts
# Move a file to a different directory
➜~mv app.tsx src/components/
# Move and rename simultaneously
➜~mv src/App.tsx src/components/MainApp.tsx
PRACTICE//Try the commands from this lesson
INTERACTIVE_TERMINAL//sandbox
Practice terminal — try the commands from this lesson!
Type 'help' for available commands. Tab completion not available in simulator.
Try: