Get Started with Ubuntu 19.04 by Vogel Matt
Author:Vogel, Matt [Vogel, Matt]
Language: eng
Format: epub
Published: 2020-06-05T16:00:00+00:00
12.8 Copying and Moving Files and Directories
It may be necessary to copy or move files and directories from time to time. The Linux command line interface has several commands that can be used to copy or move files and directories.
The following commands are covered in this section:
12.8.1 cp
12.8.2 mv
12.8.1 cp
The cp command is used to copy files and directories. The basic syntax for the cp command is cp filename newfilename .
The cp command may require root permissions to work depending upon the permissions of the file so you may have to use the sudo command.
The following subsections are covered in this section:
12.8.1.1 Copy a file to the same directory
12.8.1.2 Copy a file to a different directory
12.8.1.3 Copy a file from one directory to another
12.8.1.4 Copy a directory
12.8.1.1 Copy a file to the same directory
In the example below, the ls command is used to list the current files, the cp command is used to copy myfile1 to file2 in the current directory, and the ls command is used to verify the file copy. In this example the cp command is used to make a copy of the file and give it a new name.
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Disaster & Recovery | Email Administration |
Linux & UNIX Administration | Storage & Retrieval |
Windows Administration |
Sass and Compass in Action by Wynn Netherland Nathan Weizenbaum Chris Eppstein Brandon Mathis(7746)
Grails in Action by Glen Smith Peter Ledbrook(7668)
Configuring Windows Server Hybrid Advanced Services Exam Ref AZ-801 by Chris Gill(6248)
Azure Containers Explained by Wesley Haakman & Richard Hooper(6208)
Running Windows Containers on AWS by Marcio Morales(5732)
Kotlin in Action by Dmitry Jemerov(5020)
Microsoft 365 Identity and Services Exam Guide MS-100 by Aaron Guilmette(4739)
Management Strategies for the Cloud Revolution: How Cloud Computing Is Transforming Business and Why You Can't Afford to Be Left Behind by Charles Babcock(4397)
Combating Crime on the Dark Web by Nearchos Nearchou(4328)
Microsoft Cybersecurity Architect Exam Ref SC-100 by Dwayne Natwick(3999)
The Ruby Workshop by Akshat Paul Peter Philips Dániel Szabó and Cheyne Wallace(3991)
The Age of Surveillance Capitalism by Shoshana Zuboff(3915)
Python for Security and Networking - Third Edition by José Manuel Ortega(3551)
Learn Windows PowerShell in a Month of Lunches by Don Jones(3490)
Mastering Python for Networking and Security by José Manuel Ortega(3322)
Mastering Azure Security by Mustafa Toroman and Tom Janetscheck(3312)
Blockchain Basics by Daniel Drescher(3275)
The Ultimate Docker Container Book by Schenker Gabriel N.;(3229)
TCP IP by Todd Lammle(2960)
