Get Started With Ubuntu 18.10 by Vogel Matt
Author:Vogel, Matt [Vogel, Matt]
Language: eng
Format: mobi
Published: 2018-12-20T16:00:00+00:00
12.8.1.2 Copy a file to a different directory
The cp command can also be used to copy a file to different directory.
In the example below the cp command is used to copy myfile1 to the /tmp directory. The cd command is used to change to the /tmp directory and the ls command is used to verify the file copy.
When using the cp command to copy a file to a different directory you can omit the filename in the new location and the new file will have the same name as the original. You can also give the new file a new name when copying it to a different directory.
12.8.1.3 Copy a file from one directory to another
You can copy a file from one directory to another without being located in either directory by using paths, either relative or absolute.
In the example below the cp command is used to copy /tmp/myfile1 to the myfolder directory in the home folder, ~/ , and name the new file myfile3. The ls command is used to list the contents of myfolder without changing to the myfolder directory. In this example the working directory was neither the copy from nor the copy to location so relative and absolute paths had to be used with the cp command.
Absolute paths always start with the / character indicating the root directory and specify the absolute location in the file system. The ~ character in the prompt means the current location is the user’s home directory.
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.
Test-Driven iOS Development with Swift 4 by Dominik Hauser(7767)
Filmora Efficient Editing by Alexander Zacharias(5790)
The Infinite Retina by Robert Scoble Irena Cronin(5271)
Learn Wireshark - Fundamentals of Wireshark. by Lisa Bock(3981)
Linux Device Driver Development Cookbook by Rodolfo Giometti(3935)
Edit Like a Pro with iMovie by Regit(3431)
Linux Administration Best Practices by Scott Alan Miller(2858)
Linux Command Line and Shell Scripting Techniques by Vedran Dakic & Jasmin Redzepagic(2836)
MCSA Windows Server 2016 Study Guide: Exam 70-740 by William Panek(2521)
Mastering PowerShell Scripting - Fourth Edition by Chris Dent(2405)
Docker on Windows by Stoneman Elton(2319)
Kali Linux - An Ethical Hacker's Cookbook: End-to-end penetration testing solutions by Sharma Himanshu(2315)
Creative Projects for Rust Programmers by Carlo Milanesi(2255)
Hands-On AWS Penetration Testing with Kali Linux by Karl Gilbert(2109)
Hands-On Linux for Architects by Denis Salamanca(2052)
Programming in C (4th Edition) (Developer's Library) by Stephen G. Kochan(2005)
Computers For Seniors For Dummies by Nancy C. Muir(2003)
The Old New Thing by Raymond Chen(1941)
Linux Kernel Debugging by Kaiwan N Billimoria(1762)
