đŸ•ˇī¸ Crawler Inspector

URL Lookup

Direct Parameter Lookup

Raw Queries and Responses

1. Shard Calculation

Query:
Response:
Calculated Shard: 95 (from laksa057)

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 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://opensource.com/article/21/8/copy-files-linux-terminal
Last Crawled2026-04-08 23:31:09 (1 day ago)
First Indexed2021-08-06 07:07:29 (4 years ago)
HTTP Status Code200
Meta TitleCopy files in the Linux terminal | Opensource.com
Meta DescriptionTo copy a file on a computer with a graphical interface, you usually either drag and drop a file from one window to another window, sometimes using a modifier key.
Meta Canonicalnull
Boilerpipe Text
Use the cp command to copy files in the Linux terminal. To copy a file on a computer with a graphical interface, you usually either drag and drop a file from one window to another window, sometimes using a modifier key. Alternately, you might prefer to right-click on a file icon, select Copy , and then Paste the file icon into another window. To copy a file in a terminal, you use the cp command, which works exactly like the mv command, except that it duplicates the contents of a file rather than moving them from one location to another. $ cp example.txt ~/Documents As with the mv command, you can rename a file while copying it. $ cp example.txt ~/Documents/file.txt Be careful when using cp , because it does exactly what you tell it to do. By default, it does not ask you whether you want to copy one file over another file with the same name. To protect yourself from this, use cp --interactive (or -i for short), which runs cp in interactive mode, meaning that it will ask you whether you're sure you want to overwrite an existing file. You can either confirm or cancel and re-do the cp and rename the file to something different so that it doesn't conflict with existing files. Copy a folder The cp command looks for files, not folders because folders don't really exist (that is, they're not really data, they're just markers for us humans to logically divide our data into different imaginary containers.) To copy a folder, use cp --recursive (or -r for short) , which takes the files in the folder and recreates their imaginary container. $ cp -r Documents MyStuff $ ls Documents Downloads Music MyStuff Templates Pictures Videos You may notice that the Linux shell is eerily quiet when it works. This is actually by design. How many times have you set a computer on a task, like copying a thousand files from one drive to another, only to come back 4 hours later to find that it stopped copying after the first file, just to ask you some trivial esoteric question? Sometimes, however, it's nice to have some feedback from your OS. Usually, the -v switch adds "verbosity" to the command: $ cp -r --verbose Documents Stuff 'Documents/' -> 'Stuff' 'Documents/example.txt' -> 'Stuff/example.txt' 'Documents/file.txt' -> 'Stuff/file.txt' 'Documents/example.png' -> 'Stuff/example.png' 'Documents/picture.png' -> 'Stuff/picture.png' What to read next Seth Kenlon is a UNIX geek, free culture advocate, independent multimedia artist, and D&D nerd. He has worked in the film and computing industry, often at the same time. Related Content This work is licensed under a Creative Commons Attribution-Share Alike 4.0 International License.
Markdown
[Skip to main content](https://opensource.com/article/21/8/copy-files-linux-terminal#main-content) [![Supported by Red Hat](https://opensource.com/themes/osdc/assets/img/l_supported-by-redhat-white.svg)](https://www.redhat.com/en?intcmp=701600000011l7VAAQ) ## User account menu - [Log in](https://opensource.com/user/login?current=/article/21/8/copy-files-linux-terminal) - [RSS](https://opensource.com/feed "RSS") [![Home](https://opensource.com/themes/osdc/logo.svg)](https://opensource.com/) [![Supported by Red Hat](https://opensource.com/themes/osdc/assets/img/l_supported-by-redhat-white.svg)](https://www.redhat.com/en?intcmp=701600000011l7VAAQ) ## Main navigation - [Articles](https://opensource.com/) - [Resources](https://opensource.com/resources) - [What is open source?](https://opensource.com/resources/what-open-source) - [The open source way](https://opensource.com/open-source-way) - [Projects and applications](https://opensource.com/resources/projects-and-applications) - [Organizations](https://opensource.com/resources/organizations) - [Open source alternatives](https://opensource.com/alternatives) - [Alternatives to Acrobat](https://opensource.com/alternatives/adobe-acrobat) - [Alternatives to AutoCAD](https://opensource.com/alternatives/autocad) - [Alternatives to Dreamweaver](https://opensource.com/alternatives/dreamweaver) - [Alternatives to Gmail](https://opensource.com/alternatives/gmail) - [Alternatives to MATLAB](https://opensource.com/alternatives/matlab) - [Alternatives to Minecraft](https://opensource.com/alternatives/minecraft) - [Alternatives to Google Photos](https://opensource.com/alternatives/google-photos) - [Alternatives to Photoshop](https://opensource.com/life/12/6/design-without-debt-five-tools-for-designers) - [Alternatives to Skype](https://opensource.com/alternatives/skype) - [Alternatives to Slack](https://opensource.com/alternatives/slack) - [Alternatives to Trello](https://opensource.com/alternatives/trello) - [More...](https://opensource.com/alternatives) - [Linux](https://opensource.com/resources/linux) - [Downloads](https://opensource.com/downloads) - [Frequently Asked Questions](https://opensource.com/faq) # Copy files in the Linux terminal Use the cp command to copy files in the Linux terminal. By [Seth Kenlon](https://opensource.com/users/seth) (Team, Red Hat) August 6, 2021 \| [0 Comments](https://opensource.com/article/21/8/copy-files-linux-terminal#comments) \| %t min read ![Copying files](https://opensource.com/sites/default/files/ch01s07.svg_.png) Image by: CC BY-SA Seth Kenlon To copy a file on a computer with a graphical interface, you usually either drag and drop a file from one window to another window, sometimes using a modifier key. Alternately, you might prefer to right-click on a file icon, select **Copy**, and then **Paste** the file icon into another window. To copy a file in a terminal, you use the **cp** command, which works exactly like the **mv** command, except that it duplicates the contents of a file rather than moving them from one location to another. ``` $ cp example.txt ~/Documents ``` As with the **mv** command, you canrename a file while copying it. ``` $ cp example.txt ~/Documents/file.txt ``` Be careful when using **cp**, because it does exactly what you tell it to do. By default, it does *not* ask you whether you want to copy one file over another file with the same name. To protect yourself from this, use **cp --interactive** (or **\-i** for short), which runs **cp** in *interactive* mode, meaning that it will ask you whether you're sure you want to overwrite an existing file. You can either confirm or cancel and re-do the **cp** and rename the file to something different so that it doesn't conflict with existing files. ## Copy a folder The **cp** command looks for files, not folders because folders don't really exist (that is, they're not really data, they're just markers for us humans to logically divide our data into different imaginary containers.) To copy a folder, use **cp --recursive** (or **\-r** for short), which takes the files in the folder *and* recreates their imaginary container. ``` $ cp -r Documents MyStuff $ ls Documents Downloads Music MyStuff Templates Pictures Videos ``` You may notice that the Linux shell is eerily quiet when it works. This is actually by design. How many times have you set a computer on a task, like copying a thousand files from one drive to another, only to come back 4 hours later to find that it stopped copying after the first file, just to ask you some trivial esoteric question? Sometimes, however, it's nice to have some feedback from your OS. Usually, the **\-v** switch adds "verbosity" to the command: ``` $ cp -r --verbose Documents Stuff 'Documents/' -> 'Stuff' 'Documents/example.txt' -> 'Stuff/example.txt' 'Documents/file.txt' -> 'Stuff/file.txt' 'Documents/example.png' -> 'Stuff/example.png' 'Documents/picture.png' -> 'Stuff/picture.png' ``` More Linux resources - [Linux commands cheat sheet](https://developers.redhat.com/cheat-sheets/linux-commands-cheat-sheet/?intcmp=70160000000h1jYAAQ&utm_source=intcallout&utm_campaign=linuxcontent) - [Advanced Linux commands cheat sheet](https://developers.redhat.com/cheat-sheets/advanced-linux-commands/?intcmp=70160000000h1jYAAQ&utm_source=intcallout&utm_campaign=linuxcontent) - [Free online course: RHEL Technical Overview](https://www.redhat.com/en/services/training/rh024-red-hat-linux-technical-overview?intcmp=70160000000h1jYAAQ&utm_source=intcallout&utm_campaign=linuxcontent) - [Linux networking cheat sheet](https://opensource.com/downloads/cheat-sheet-networking?intcmp=70160000000h1jYAAQ&utm_source=intcallout&utm_campaign=linuxcontent) - [SELinux cheat sheet](https://opensource.com/downloads/cheat-sheet-selinux?intcmp=70160000000h1jYAAQ&utm_source=intcallout&utm_campaign=linuxcontent) - [Linux common commands cheat sheet](https://opensource.com/downloads/linux-common-commands-cheat-sheet?intcmp=70160000000h1jYAAQ&utm_source=intcallout&utm_campaign=linuxcontent) - [What are Linux containers?](https://opensource.com/resources/what-are-linux-containers?intcmp=70160000000h1jYAAQ&utm_source=intcallout&utm_campaign=linuxcontent) - [Our latest Linux articles](https://opensource.com/tags/linux?intcmp=70160000000h1jYAAQ&utm_source=intcallout&utm_campaign=linuxcontent) What to read next [![Moving files](https://opensource.com/sites/default/files/styles/article_teaser/public/ch01s05.svg_.png?itok=OVPVHad1)](https://opensource.com/article/21/8/move-files-linux) ## [Move files in the Linux terminal](https://opensource.com/article/21/8/move-files-linux) Use the mv command to move a file from one location to another. [Seth Kenlon](https://opensource.com/users/seth) (Team, Red Hat) August 4, 2021 [![rename files](https://opensource.com/sites/default/files/styles/article_teaser/public/ch01s06.svg_.png?itok=3pinRjcP)](https://opensource.com/article/21/8/rename-file-linux-terminal) ## [Rename a file in the Linux terminal](https://opensource.com/article/21/8/rename-file-linux-terminal) To rename a file in the terminal, move the file with mv from itself to itself with a new name. Here's an example. [Seth Kenlon](https://opensource.com/users/seth) (Team, Red Hat) August 5, 2021 [![Top 5 Linux pain points in 2017](https://opensource.com/sites/default/files/styles/article_teaser/public/lead-images/linux-penguins.png?itok=TKrRBdlw)](https://opensource.com/article/20/5/linux-desktops) ## [24 Linux desktops you need to try](https://opensource.com/article/20/5/linux-desktops) Gotta catch them all\! [Seth Kenlon](https://opensource.com/users/seth) (Team, Red Hat) May 19, 2020 Tags [Linux](https://opensource.com/tags/linux) [Command line](https://opensource.com/tags/command-line) [Seth Kenlon](https://opensource.com/users/seth) ![Seth Kenlon](https://opensource.com/sites/default/files/styles/150x150/public/pictures/seth_headshot-lawrence_0.jpg?itok=jZUHBHx4) Seth Kenlon is a UNIX geek, free culture advocate, independent multimedia artist, and D\&D nerd. He has worked in the film and computing industry, often at the same time. [More about me](https://opensource.com/users/seth) ## Comments are closed. These comments are closed. ## Related Content [![GNOME](https://opensource.com/sites/default/files/styles/222x125/public/lead-images/custom_gnomes.png?itok=cERF8C4e)](https://opensource.com/article/23/4/linux-gnome-44-features) [What's new in GNOME 44?](https://opensource.com/article/23/4/linux-gnome-44-features) [![Computer laptop in space](https://opensource.com/sites/default/files/styles/222x125/public/lead-images/computer_space_graphic_cosmic.png?itok=5rMxPHCU)](https://opensource.com/article/23/4/5-reasons-virtual-machines-still-matter) [5 reasons virtual machines still matter](https://opensource.com/article/23/4/5-reasons-virtual-machines-still-matter) [![Painting art on a computer screen](https://opensource.com/sites/default/files/styles/222x125/public/lead-images/painting_computer_screen_art_design_creative.png?itok=QNbZrbH6)](https://opensource.com/article/23/4/image-editing-linux-python) [Remove the background from an image with this Linux command](https://opensource.com/article/23/4/image-editing-linux-python) [![Creative Commons License](https://opensource.com/themes/osdc/assets/img/cc-by-sa-4.png)](https://creativecommons.org/licenses/by-sa/4.0/)This work is licensed under a Creative Commons Attribution-Share Alike 4.0 International License. ## About This Site The opinions expressed on this website are those of each author, not of the author's employer or of Red Hat. [Opensource.com](https://opensource.com/) aspires to publish all content under a [Creative Commons license](https://creativecommons.org/licenses/) but may not be able to do so in all cases. You are responsible for ensuring that you have the necessary permission to reuse any work on this site. Red Hat and the Red Hat logo are trademarks of Red Hat, LLC, registered in the United States and other countries. A note on advertising: Opensource.com does not sell advertising on the site or in any of its newsletters. [![Home](https://opensource.com/themes/osdc/logo.svg)](https://opensource.com/) Copyright Š2021 Red Hat, LLC ## Legal - [Privacy Policy](https://opensource.com/privacy-policy) - [Terms of use](https://opensource.com/legal)
Readable Markdown
Use the cp command to copy files in the Linux terminal. To copy a file on a computer with a graphical interface, you usually either drag and drop a file from one window to another window, sometimes using a modifier key. Alternately, you might prefer to right-click on a file icon, select **Copy**, and then **Paste** the file icon into another window. To copy a file in a terminal, you use the **cp** command, which works exactly like the **mv** command, except that it duplicates the contents of a file rather than moving them from one location to another. ``` $ cp example.txt ~/Documents ``` As with the **mv** command, you canrename a file while copying it. ``` $ cp example.txt ~/Documents/file.txt ``` Be careful when using **cp**, because it does exactly what you tell it to do. By default, it does *not* ask you whether you want to copy one file over another file with the same name. To protect yourself from this, use **cp --interactive** (or **\-i** for short), which runs **cp** in *interactive* mode, meaning that it will ask you whether you're sure you want to overwrite an existing file. You can either confirm or cancel and re-do the **cp** and rename the file to something different so that it doesn't conflict with existing files. ## Copy a folder The **cp** command looks for files, not folders because folders don't really exist (that is, they're not really data, they're just markers for us humans to logically divide our data into different imaginary containers.) To copy a folder, use **cp --recursive** (or **\-r** for short), which takes the files in the folder *and* recreates their imaginary container. ``` $ cp -r Documents MyStuff $ ls Documents Downloads Music MyStuff Templates Pictures Videos ``` You may notice that the Linux shell is eerily quiet when it works. This is actually by design. How many times have you set a computer on a task, like copying a thousand files from one drive to another, only to come back 4 hours later to find that it stopped copying after the first file, just to ask you some trivial esoteric question? Sometimes, however, it's nice to have some feedback from your OS. Usually, the **\-v** switch adds "verbosity" to the command: ``` $ cp -r --verbose Documents Stuff 'Documents/' -> 'Stuff' 'Documents/example.txt' -> 'Stuff/example.txt' 'Documents/file.txt' -> 'Stuff/file.txt' 'Documents/example.png' -> 'Stuff/example.png' 'Documents/picture.png' -> 'Stuff/picture.png' ``` What to read next ![Seth Kenlon](https://opensource.com/sites/default/files/styles/150x150/public/pictures/seth_headshot-lawrence_0.jpg?itok=jZUHBHx4) Seth Kenlon is a UNIX geek, free culture advocate, independent multimedia artist, and D\&D nerd. He has worked in the film and computing industry, often at the same time. ## Related Content [![GNOME](https://opensource.com/sites/default/files/styles/222x125/public/lead-images/custom_gnomes.png?itok=cERF8C4e)](https://opensource.com/article/23/4/linux-gnome-44-features) [![Computer laptop in space](https://opensource.com/sites/default/files/styles/222x125/public/lead-images/computer_space_graphic_cosmic.png?itok=5rMxPHCU)](https://opensource.com/article/23/4/5-reasons-virtual-machines-still-matter) [![Painting art on a computer screen](https://opensource.com/sites/default/files/styles/222x125/public/lead-images/painting_computer_screen_art_design_creative.png?itok=QNbZrbH6)](https://opensource.com/article/23/4/image-editing-linux-python) [![Creative Commons License](https://opensource.com/themes/osdc/assets/img/cc-by-sa-4.png)](https://creativecommons.org/licenses/by-sa/4.0/)This work is licensed under a Creative Commons Attribution-Share Alike 4.0 International License.
Shard95 (laksa)
Root Hash12209221891525358495
Unparsed URLcom,opensource!/article/21/8/copy-files-linux-terminal s443