Moving files and directories works a bit differently than copying files. In many cases moving a file in Linux is instantaneous as no data is actually copied or moved. In Linux we also use the mv command to rename files and directories. AS with cp we can provide options to mv so it doesn't clobber existing files.
- [Instructor] When Linux copies a file…it copies the file data blocks…to a new location on the disk.…When moving a file between file systems,…Linux copies the data blocks to the new location…and then deletes the original data blocks.…If, however, the source and destination are…on the same file system,…Linux treats the file differently.…If we have a file at /home/bob/file1.txt…and we want to move it to /home/ted…we'd use the move command,…or mv command.…
Since both of these locations are on the same hard drive,…Linux just updates the file's location…in the file system.…This is very fast because no data is actually…being moved on the disk.…We can also move a file from a directory…to the same directory…as long as we specify a different name.…If we move /home/ted/file1.txt…to /home/ted/file2.txt…it effectively renames it.…This is why we use the mv command…to rename files in Linux.…
The syntax for move is mv…which is the command name…and then the options.…The options can take the form of single letters…preceded by a hyphen…
- Define file Access Control Lists.
- Describe what extended globs add to Linux pattern matching.
- State why file system recovery tools are so important for Linux users.
- Recall what execute permissions on a directory allows.
- Cite the maximum allowed default permissions on a file in Linux.
- List some of the advantages of ACLs over standard Unix permissions.
Skill Level Intermediate
Linux: Desktops and Remote Accesswith Grant McWilliams1h 44m Intermediate
1. Linux Files
2. Manipulate Files
3. Standard Unix Permissions
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.