From the course: Red Hat Certified System Administrator (EX200) Cert Prep: 1 Deploy, Configure, and Manage (2021)
Unlock the full course today
Join today to access over 22,500 courses taught by industry experts or purchase this course individually.
Move files and directories
From the course: Red Hat Certified System Administrator (EX200) Cert Prep: 1 Deploy, Configure, and Manage (2021)
Move files and directories
- [Instructor] When Linux copies a file it copies the file data blocks to a new location on the disc. 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 trees the filed differently. If we have a file that /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 files location in the file system. This is very fast because no data is actually being moved on the disc. 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…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
Use input-output redirection (>, >>, |, 2>, and more)5m 2s
-
Use grep and regular expressions to analyze text5m 55s
-
Archive files using tar4m 40s
-
Compress files and archives4m 14s
-
Create files and directories5m 18s
-
Copy files and directories5m 48s
-
Move files and directories4m 59s
-
Remove files and directories6m 2s
-
Create hard and soft links4m 55s
-
Introduction to vim3m 33s
-
Editing text with vim2m 45s
-
Locate, read, and use system documentation5m 2s
-
Locate and interpret system log files6m
-
Reading the system journal3m 18s
-
-
-