🕷️ Crawler Inspector

URL Lookup

Direct Parameter Lookup

Raw Queries and Responses

1. Shard Calculation

Query:
Response:
Calculated Shard: 65 (from laksa171)

2. Crawled Status Check

Query:
Response:

3. Robots.txt Check

Query:
Response:

4. Spam/Ban Check

Query:
Response:

5. Seen Status Check

ℹ️ Skipped - page is already crawled

đź“„
INDEXABLE
âś…
CRAWLED
1 day ago
🤖
ROBOTS ALLOWED

Page Info Filters

FilterStatusConditionDetails
HTTP statusPASSdownload_http_code = 200HTTP 200
Age cutoffPASSdownload_stamp > now() - 6 MONTH0.1 months ago
History dropPASSisNull(history_drop_reason)No drop reason
Spam/banPASSfh_dont_index != 1 AND ml_spam_score = 0ml_spam_score=0
CanonicalPASSmeta_canonical IS NULL OR = '' OR = src_unparsedNot set

Page Details

PropertyValue
URLhttps://www.macworld.com/article/222558/macos-command-line-copying-moving-files-terminal.html
Last Crawled2026-04-05 08:10:58 (1 day ago)
First Indexed2021-07-01 07:19:27 (4 years ago)
HTTP Status Code200
Meta TitleHow to copy and move files through Terminal | Macworld
Meta DescriptionWish you could move a bunch of folders all at once or instantly move every file of a certain type into a new folder? Using your Mac's Terminal commands may be the answer.
Meta Canonicalnull
Boilerpipe Text
The command line—that hidden world of code behind your Mac’s pretty face—sometimes offers a quicker way to do everyday tasks, plus it’s just a cool way to establish your tech cred. You’ve learned how to navigate files and folders as well as delete files and folders with the command line and get help when you need it from man pages . Here, I’ll show you how to copy and move files, common operations that often come in handy. I’ll also show you how to create directories (that’s Unix-speak for folders), so you can move files to new places. Why bother with the command line? It’s certainly easy to copy and move files in the Finder, but there are a number of reasons why you might want to do this from the command line instead: You can copy or move files from one location to another without opening windows in the Finder. You can copy or move files that are hidden in the Finder. These files, which can contain settings for certain apps or parts of the Mac, contain a dot (.) before their names, and the Finder doesn’t show them. You can copy or move multiple files using wildcards. You can rename a file quickly. If you’ve lost access to the Finder because your Mac is on the blink, you might be able to use the command line to troubleshoot the problem. The difference between copying and moving files If you’re in the Finder, and you drag a file from, say, your Desktop to your Documents folder, or any other folder on the same disk or volume, you move the file. The file is no longer on the Desktop, and is found only in the Documents folder. However, if you drag a file from your Desktop to an external hard disk, you’ll see that the file remains in its original location; this file has been copied. (You may know that you can copy a file in the Finder, even on the same hard disk, by holding down the Option key when you drag it.) The same is the case from the command line. There are two commands for moving and copying: mv and  cp . The first does the same as dragging a file to a new location on the same hard disk. The second does what an Option-drag does, or what happens when you drag a file to a different disk or volume. How to copy files and directories Copying files with the cp command is simple. First, launch Terminal (in your /Applications/Utilities folder). Then, use the following syntax to create your command: cp source destination For example, to copy a file named MyFile.rtf from your Desktop folder to your Documents folder, you would type in the following command in Terminal and then press Return: cp ~/Desktop/MyFile.rtf ~/Documents You’ll now have a file named MyFile.rtf on your Desktop, and a copy of that file in your Documents folder. You’ll remember from “Master the command line: Navigating files and folders” that the tilde (~) symbol is a shortcut for your Home folder, which contains your Documents folder. This command takes the file at the precise path you specify as the source argument, and moves it to the directory (folder), which is the destination. Note that if there’s no file there, or if you type the name incorrectly, Terminal will give you a “No such file or directory” error. If you type a file path incorrectly, Terminal will let you know with a “No such file or directory” error. IDG You can also copy directories , including all the files they contain. This uses a special “flag” or “option” with the cp command : the -R or recursive flag. When you use options with commands, this additional letter—always preceded by a hyphen (-)—tells the command to do something a bit differently. The recursive option tells the cp command to copy every item in the folder: every sub-folder, every file and folder in every sub-folder, and so one, all the way down, to the new location. So you can copy a directory from your Desktop to your Documents folder like this: cp -R ~/Desktop/MyFolder /Documents You’ve probably guessed that the mv command works in the same way. But there are two ways you can use the mv command. The first moves a file to a different disk or volume; remember, just as in the Finder, copying a file to a different volume won’t delete the original, whereas moving will. So you could issue this command to move a file from your Desktop to a folder on a backup disk: mv ~/Desktop/MyFile.rtf /Volumes/Backup/MyFolder You can also move directories with the mv command. The syntax is the same, and you don’t need the -R flag as you do with the cp command.: mv ~/Desktop/MyFolder /Volumes/Backup How to copy or move multiple files One of the great things about the command line is the way you can use wildcards to simplify commands. For example, if you want to copy all the .rtf files (Rich Text Files) from your Desktop to your Documents folder, you can use the asterisk (*) wildcard: cp ~/Desktop/*.rtf ~/Documents You can use the same wildcard with the mv command to move multiple files. How to rename files The mv command also lets you quickly rename files. What you do is essentially move a file to the same location, but change its name. If you specify a name for its destination, the mv command changes the file’s name when it moves the file. You can change a file name like this: mv ~/Desktop/MyFile.rtf ~/Desktop/MyFile-old.rtf This is a valuable tool for troubleshooting; you can use this to create a backup copy of a file, such as a preference file, in case you need it again. But you can also use this renaming method simply because you want to rename a file. You can also copy a file with cp and change its name. In this case, you need to specify not just a destination directory, but also a name for the file: cp ~/Desktop/MyFile.rtf ~/Documents/MyFile1.rtf How to create directories (a.k.a. folders) Here’s one final command that may come in handy: mkdir , the make directory command. This is very useful when you need to make a bunch of folders in one fell swoop, say for a new project you’re starting. First use the cd ( change directories ) command to move into the directory where want to create a new directory. Once you’re there, run this command (in the example below, DirectoryName is the name you want. Replace DirectoryName with your desired name): mkdir DirectoryName You can use any name for the directory (for instance, “Hot Project” or “TPS Reports”), and you can make multiple directories with a single command: mkdir MyDirectory1 MyDirectory2 MyDirectory3 With these three simple commands— mv , cp , and mkdir —you’ll be able to copy and move files, as well as create directories to hold files anywhere in your Mac’s file system. As you become proficient with these commands, you’ll see how easy they are to use.
Markdown
English US Edition - Edition - [English UK]() - [English US]() - [Mac](https://www.macworld.com/mac) - [iPhone](https://www.macworld.com/iphone) - [iPad](https://www.macworld.com/ipad) - [Apple Watch](https://www.macworld.com/apple-watch) - [AirPods](https://www.macworld.com/airpods) - [Vision Pro](https://www.macworld.com/vision) - MoreExpand More - [Accessories](https://www.macworld.com/accessories) - [Apple](https://www.macworld.com/apple) - [Apple TV](https://www.macworld.com/apple-tv) - [Audio](https://www.macworld.com/audio) - [Security](https://www.macworld.com/security) - [Software](https://www.macworld.com/software) - [Best Picks](https://www.macworld.com/best-picks) - [Reviews](https://www.macworld.com/reviews) - [Deals](https://www.macworld.com/deals) - [Opinion](https://www.macworld.com/opinion) - [Rumors](https://www.macworld.com/apple-rumors) - [Newsletter](https://www.macworld.com/newsletters/signup) - [Digital Magazine – Subscribe](https://simplecirc.com/subscribe/macworld) - [Digital Magazine – Info](https://www.macworld.com/faq) - [Smart Answers](https://www.macworld.com/smart-answers) - Client ContentExpand Client Content - [BrandPosts](https://www.macworld.com/brandposts) [Skip to content](https://www.macworld.com/article/222558/macos-command-line-copying-moving-files-terminal.html#primary) - [Menu](https://www.macworld.com/article/222558/macos-command-line-copying-moving-files-terminal.html) - [Mac](https://www.macworld.com/mac) - [iPhone](https://www.macworld.com/iphone) - [iPad](https://www.macworld.com/ipad) - [Apple Watch](https://www.macworld.com/apple-watch) - [AirPods](https://www.macworld.com/airpods) - [Vision Pro](https://www.macworld.com/vision) - MoreExpand More - [Accessories](https://www.macworld.com/accessories) - [Apple](https://www.macworld.com/apple) - [Apple TV](https://www.macworld.com/apple-tv) - [Audio](https://www.macworld.com/audio) - [Security](https://www.macworld.com/security) - [Software](https://www.macworld.com/software) - [Best Picks](https://www.macworld.com/best-picks) - [Reviews](https://www.macworld.com/reviews) - [Deals](https://www.macworld.com/deals) - [Opinion](https://www.macworld.com/opinion) - [Rumors](https://www.macworld.com/apple-rumors) - [Newsletter](https://www.macworld.com/newsletters/signup) - [Digital Magazine – Subscribe](https://simplecirc.com/subscribe/macworld) - [Digital Magazine – Info](https://www.macworld.com/faq) - [Smart Answers](https://www.macworld.com/smart-answers) - Client ContentExpand Client Content - [BrandPosts](https://www.macworld.com/brandposts) Type your search and hit enter HOT TOPICS - [Apple’s 50th](https://www.macworld.com/apples-50th-anniversary) - [Mac mini M5](https://www.macworld.com/article/2964754/2026-mac-mini-m5-pro-design-specs-release-date.html) - [Mac Studio M5](https://www.macworld.com/article/2973459/2026-mac-studio-m5-release-date-specs-price-rumors.html) - [iPhone 18](https://www.macworld.com/article/2953687/iphone-18-pro-2026-release-date-design-specs-rumors.html) - [iPhone Fold](https://www.macworld.com/article/2629813/apple-folding-iphone-design-display-specs-release.html) - [iPad mini 2026](https://www.macworld.com/article/3060022/2026-ipad-mini-design-display-features-specs-release-date.html) - [iPad 2026](https://www.macworld.com/article/3030272/2026-ipad-a19-design-display-specs-release-price.html) - [Best Mac antivirus](https://www.macworld.com/article/668850/best-mac-antivirus-software.html) - [Best Mac VPN](https://www.macworld.com/article/231047/best-vpn-for-mac.html) When you purchase through links in our articles, we may earn a small commission. This doesn't affect our [editorial independence](https://www.macworld.com/about/affiliate-link-policy). 1. [Home](https://www.macworld.com/) 2. [Software](https://www.macworld.com/software) 3. [How-To](https://www.macworld.com/software/how-to) How-To # Master the macOS command line: How to copy and move files through Terminal Wish you could move a bunch of folders all at once or instantly move every file of a certain type into a new folder? The command line may be the answer. ![Kirk McElhearn](https://www.macworld.com/wp-content/uploads/2025/06/mcelhearn_newhead-100221033-orig.jpg?quality=50&strip=all&w=150) By [Kirk McElhearn](https://www.macworld.com/author/kmcelhearn) Contributor, Macworld JUL 6, 2022 12:45 am PDT ![macOS Big Sur Terminal icon](https://www.macworld.com/wp-content/uploads/2025/05/macos-big-sur-terminal-icon-2.jpg?quality=50&strip=all&w=1024) Image: Apple The command line—that hidden world of code behind your Mac’s pretty face—sometimes offers a quicker way to do everyday tasks, plus it’s just a cool way to establish your tech cred. You’ve learned how to [navigate files and folders](https://www.macworld.com/article/221277/command-line-navigating-files-folders-mac-terminal.html) as well as [delete files and folders](https://www.macworld.com/article/222596/command-line-deleting-files-folders-mac-terminal.html) with the command line and [get help when you need it from man pages](https://www.macworld.com/article/221483/command-line-how-to-use-man-pages-terminal.html). Here, I’ll show you how to copy and move files, common operations that often come in handy. I’ll also show you how to create directories (that’s Unix-speak for folders), so you can move files to new places. ## Why bother with the command line? It’s certainly easy to copy and move files in the Finder, but there are a number of reasons why you might want to do this from the command line instead: - You can copy or move files from one location to another without opening windows in the Finder. - You can copy or move files that are hidden in the Finder. These files, which can contain settings for certain apps or parts of the Mac, contain a dot (.) before their names, and the Finder doesn’t show them. - You can copy or move *multiple* files using wildcards. - You can rename a file quickly. - If you’ve lost access to the Finder because your Mac is on the blink, you might be able to use the command line to troubleshoot the problem. ## The difference between copying and moving files If you’re in the Finder, and you drag a file from, say, your Desktop to your Documents folder, or any other folder on the same disk or volume, you move the file. The file is no longer on the Desktop, and is found only in the Documents folder. However, if you drag a file from your Desktop to an external hard disk, you’ll see that the file remains in its original location; this file has been copied. (You may know that you can copy a file in the Finder, even on the same hard disk, by holding down the Option key when you drag it.) The same is the case from the command line. There are two commands for moving and copying: `mv` and `cp`. The first does the same as dragging a file to a new location on the same hard disk. The second does what an Option-drag does, or what happens when you drag a file to a different disk or volume. ## How to copy files and directories **Copying files** with the `cp` command is simple. First, launch Terminal (in your /Applications/Utilities folder). Then, use the following syntax to create your command: **`cp source destination`** For example, to copy a file named MyFile.rtf from your Desktop folder to your Documents folder, you would type in the following command in Terminal and then press Return: `cp ~/Desktop/MyFile.rtf ~/Documents` You’ll now have a file named MyFile.rtf on your Desktop, and a copy of that file in your Documents folder. You’ll remember from [“Master the command line: Navigating files and folders”](https://www.macworld.com/article/221277/command-line-navigating-files-folders-mac-terminal.html) that the tilde (~) symbol is a shortcut for your Home folder, which contains your Documents folder. This command takes the file at the precise path you specify as the source argument, and moves it to the directory (folder), which is the destination. Note that if there’s no file there, or if you type the name incorrectly, Terminal will give you a “No such file or directory” error. ![macOS Terminal no file ](https://b2c-contenthub.com/wp-content/uploads/2021/06/terminal-no-file-macos.jpg?quality=50&strip=all&w=1200) If you type a file path incorrectly, Terminal will let you know with a “No such file or directory” error. IDG You can also **copy directories**, including all the files they contain. This uses a special “flag” or “option” with the `cp command`: the **`-R`** or recursive flag. When you use options with commands, this additional letter—always preceded by a hyphen (-)—tells the command to do something a bit differently. The recursive option tells the `cp` command to copy every item in the folder: every sub-folder, every file and folder in every sub-folder, and so one, all the way down, to the new location. So you can copy a directory from your Desktop to your Documents folder like this: `cp -R ~/Desktop/MyFolder /Documents` ## How to move files You’ve probably guessed that the `mv` command works in the same way. But there are two ways you can use the **`mv`** command. The first moves a file to a different disk or volume; remember, just as in the Finder, copying a file to a different volume won’t delete the original, whereas moving will. So you could issue this command to move a file from your Desktop to a folder on a backup disk: ``` mv ~/Desktop/MyFile.rtf /Volumes/Backup/MyFolder ``` You can also move directories with the `mv` command. The syntax is the same, and you don’t need the `-R` flag as you do with the **cp** command.: `mv ~/Desktop/MyFolder /Volumes/Backup` ## How to copy or move multiple files One of the great things about the command line is the way you can use wildcards to simplify commands. For example, if you want to copy all the .rtf files (Rich Text Files) from your Desktop to your Documents folder, you can use the asterisk (\*) wildcard: `cp ~/Desktop/*.rtf ~/Documents` You can use the same wildcard with the `mv` command to move multiple files. ## How to rename files The `mv` command also lets you quickly rename files. What you do is essentially move a file to the same location, but change its name. If you specify a name for its destination, the `mv` command changes the file’s name when it moves the file. You can change a file name like this: `mv ~/Desktop/MyFile.rtf ~/Desktop/MyFile-old.rtf` This is a valuable tool for troubleshooting; you can use this to create a backup copy of a file, such as a preference file, in case you need it again. But you can also use this renaming method simply because you want to rename a file. You can also copy a file with **`cp`** and change its name. In this case, you need to specify not just a destination directory, but also a name for the file: `cp ~/Desktop/MyFile.rtf ~/Documents/MyFile1.rtf` ## How to create directories (a.k.a. folders) Here’s one final command that may come in handy: `mkdir`, the *make directory* command. This is very useful when you need to make a bunch of folders in one fell swoop, say for a new project you’re starting. First use the **`cd`** (*change directories*) command to move into the directory where want to create a new directory. Once you’re there, run this command (in the example below, **`DirectoryName`** is the name you want. Replace **`DirectoryName`** with your desired name): **`mkdir DirectoryName`** You can use any name for the directory (for instance, “Hot Project” or “TPS Reports”), and you can make multiple directories with a single command: **`mkdir MyDirectory1 MyDirectory2 MyDirectory3`** With these three simple commands—**`mv`**, `cp`, and **`mkdir`**—you’ll be able to copy and move files, as well as create directories to hold files anywhere in your Mac’s file system. As you become proficient with these commands, you’ll see how easy they are to use. ### [Author: Kirk McElhearn](https://www.macworld.com/author/kmcelhearn), Contributor, Macworld ![](https://www.macworld.com/wp-content/uploads/2025/06/mcelhearn_newhead-100221033-orig.jpg?quality=50&strip=all&w=150&h=150&crop=1) Kirk McElhearn ([@mcelhearn](http://twitter.com/mcelhearn)) writes about Macs, music and more on his blog [Kirkville](http://www.kirkville.com/). He also runs [Kirk's iTunes Forum](http://forum.mcelhearn.com/), where users can discuss iTunes, iOS devices, music, and more. ### Recent stories by Kirk McElhearn: - [Master the macOS command line: How to delete files and folders using Terminal](https://www.macworld.com/article/222596/command-line-deleting-files-folders-mac-terminal.html) - [How to look at your command history list in macOS’s Terminal](https://www.macworld.com/article/351872/how-to-look-at-your-command-history-list-in-macoss-terminal.html) - [Master the macOS command line: How to navigate files and folders in Terminal](https://www.macworld.com/article/221277/command-line-navigating-files-folders-mac-terminal.html) Macworld is your best source for all things Apple. We give you the scoop on what's new, what's best and how to make the most out of the products you love. - POLICIESExpand POLICIES - [Privacy Policy](https://foundryco.com/privacy-policy/) - [Cookie Policy](https://foundryco.com/cookie-policy/) - [Terms of Service](https://foundryco.com/terms-of-service-agreement/) - [Copyright Notice](https://foundryco.com/copyright-notice/) - [European Privacy Settings](https://www.macworld.com/about/member-preferences#cookie) - [Member Preferences](https://www.macworld.com/about/member-preferences) - [Editorial Independence](https://www.macworld.com/about/affiliate-link-policy) - [Licensing & Eprints](https://info.wrightsmedia.com/foundry-media-licensing) - [California: Do not sell my Personal Info](https://www.macworld.com/about/ccpa) - ABOUTExpand ABOUT - [About Us](https://www.macworld.com/about) - [Contact Us](https://www.macworld.com/about/contact) - [Advertise](https://foundryco.com/our-brands/macworld/) - [Ad Choices](https://foundryco.com/ad-choices/) - [Foundry Careers](https://foundryco.com/work-here/) - [Smart Answers](https://www.macworld.com/smart-answers) - More from Macworld Expand submenu for More from Macworld - [Macworld Sweden](https://www.macworld.se/) [Macwelt Germany](https://www.macwelt.de/) - Subscribe Expand submenu for Subscribe - [Subscribe to the Macworld Digital Magazine](https://simplecirc.com/subscribe/macworld) [Manage Subscription](https://simplecirc.com/subscriber_login/macworld) [Newsletter](https://www.macworld.com/newsletters/signup) [Follow us on WhatsApp](https://whatsapp.com/channel/0029VagNnbe002TCyUyKte2j) [Copyright © 2026 FoundryCo, Inc.](https://foundryco.com/terms-of-service-agreement/) [Top Of Page]() Do Not Sell or Share My Personal Information Privacy Settings ![]() ![]()
Readable Markdown
The command line—that hidden world of code behind your Mac’s pretty face—sometimes offers a quicker way to do everyday tasks, plus it’s just a cool way to establish your tech cred. You’ve learned how to [navigate files and folders](https://www.macworld.com/article/221277/command-line-navigating-files-folders-mac-terminal.html) as well as [delete files and folders](https://www.macworld.com/article/222596/command-line-deleting-files-folders-mac-terminal.html) with the command line and [get help when you need it from man pages](https://www.macworld.com/article/221483/command-line-how-to-use-man-pages-terminal.html). Here, I’ll show you how to copy and move files, common operations that often come in handy. I’ll also show you how to create directories (that’s Unix-speak for folders), so you can move files to new places. ## Why bother with the command line? It’s certainly easy to copy and move files in the Finder, but there are a number of reasons why you might want to do this from the command line instead: - You can copy or move files from one location to another without opening windows in the Finder. - You can copy or move files that are hidden in the Finder. These files, which can contain settings for certain apps or parts of the Mac, contain a dot (.) before their names, and the Finder doesn’t show them. - You can copy or move *multiple* files using wildcards. - You can rename a file quickly. - If you’ve lost access to the Finder because your Mac is on the blink, you might be able to use the command line to troubleshoot the problem. ## The difference between copying and moving files If you’re in the Finder, and you drag a file from, say, your Desktop to your Documents folder, or any other folder on the same disk or volume, you move the file. The file is no longer on the Desktop, and is found only in the Documents folder. However, if you drag a file from your Desktop to an external hard disk, you’ll see that the file remains in its original location; this file has been copied. (You may know that you can copy a file in the Finder, even on the same hard disk, by holding down the Option key when you drag it.) The same is the case from the command line. There are two commands for moving and copying: `mv` and `cp`. The first does the same as dragging a file to a new location on the same hard disk. The second does what an Option-drag does, or what happens when you drag a file to a different disk or volume. ## How to copy files and directories **Copying files** with the `cp` command is simple. First, launch Terminal (in your /Applications/Utilities folder). Then, use the following syntax to create your command: **`cp source destination`** For example, to copy a file named MyFile.rtf from your Desktop folder to your Documents folder, you would type in the following command in Terminal and then press Return: `cp ~/Desktop/MyFile.rtf ~/Documents` You’ll now have a file named MyFile.rtf on your Desktop, and a copy of that file in your Documents folder. You’ll remember from [“Master the command line: Navigating files and folders”](https://www.macworld.com/article/221277/command-line-navigating-files-folders-mac-terminal.html) that the tilde (~) symbol is a shortcut for your Home folder, which contains your Documents folder. This command takes the file at the precise path you specify as the source argument, and moves it to the directory (folder), which is the destination. Note that if there’s no file there, or if you type the name incorrectly, Terminal will give you a “No such file or directory” error. ![macOS Terminal no file ](https://b2c-contenthub.com/wp-content/uploads/2021/06/terminal-no-file-macos.jpg?quality=50&strip=all&w=1200) If you type a file path incorrectly, Terminal will let you know with a “No such file or directory” error. IDG You can also **copy directories**, including all the files they contain. This uses a special “flag” or “option” with the `cp command`: the **`-R`** or recursive flag. When you use options with commands, this additional letter—always preceded by a hyphen (-)—tells the command to do something a bit differently. The recursive option tells the `cp` command to copy every item in the folder: every sub-folder, every file and folder in every sub-folder, and so one, all the way down, to the new location. So you can copy a directory from your Desktop to your Documents folder like this: `cp -R ~/Desktop/MyFolder /Documents` You’ve probably guessed that the `mv` command works in the same way. But there are two ways you can use the **`mv`** command. The first moves a file to a different disk or volume; remember, just as in the Finder, copying a file to a different volume won’t delete the original, whereas moving will. So you could issue this command to move a file from your Desktop to a folder on a backup disk: ``` mv ~/Desktop/MyFile.rtf /Volumes/Backup/MyFolder ``` You can also move directories with the `mv` command. The syntax is the same, and you don’t need the `-R` flag as you do with the **cp** command.: `mv ~/Desktop/MyFolder /Volumes/Backup` ## How to copy or move multiple files One of the great things about the command line is the way you can use wildcards to simplify commands. For example, if you want to copy all the .rtf files (Rich Text Files) from your Desktop to your Documents folder, you can use the asterisk (\*) wildcard: `cp ~/Desktop/*.rtf ~/Documents` You can use the same wildcard with the `mv` command to move multiple files. ## How to rename files The `mv` command also lets you quickly rename files. What you do is essentially move a file to the same location, but change its name. If you specify a name for its destination, the `mv` command changes the file’s name when it moves the file. You can change a file name like this: `mv ~/Desktop/MyFile.rtf ~/Desktop/MyFile-old.rtf` This is a valuable tool for troubleshooting; you can use this to create a backup copy of a file, such as a preference file, in case you need it again. But you can also use this renaming method simply because you want to rename a file. You can also copy a file with **`cp`** and change its name. In this case, you need to specify not just a destination directory, but also a name for the file: `cp ~/Desktop/MyFile.rtf ~/Documents/MyFile1.rtf` ## How to create directories (a.k.a. folders) Here’s one final command that may come in handy: `mkdir`, the *make directory* command. This is very useful when you need to make a bunch of folders in one fell swoop, say for a new project you’re starting. First use the **`cd`** (*change directories*) command to move into the directory where want to create a new directory. Once you’re there, run this command (in the example below, **`DirectoryName`** is the name you want. Replace **`DirectoryName`** with your desired name): **`mkdir DirectoryName`** You can use any name for the directory (for instance, “Hot Project” or “TPS Reports”), and you can make multiple directories with a single command: **`mkdir MyDirectory1 MyDirectory2 MyDirectory3`** With these three simple commands—**`mv`**, `cp`, and **`mkdir`**—you’ll be able to copy and move files, as well as create directories to hold files anywhere in your Mac’s file system. As you become proficient with these commands, you’ll see how easy they are to use.
Shard65 (laksa)
Root Hash396360764723510065
Unparsed URLcom,macworld!www,/article/222558/macos-command-line-copying-moving-files-terminal.html s443