From b76270bf9e6dd375e495fec92140a79a79415d27 Mon Sep 17 00:00:00 2001 From: Patrick J Volkerding Date: Wed, 19 May 2010 08:58:23 +0000 Subject: Slackware 13.1 Wed May 19 08:58:23 UTC 2010 Slackware 13.1 x86_64 stable is released! Lots of thanks are due -- see the RELEASE_NOTES and the rest of the ChangeLog for credits. The ISOs are on their way to replication, a 6 CD-ROM 32-bit set and a dual-sided 32-bit/64-bit x86/x86_64 DVD. We are taking pre-orders now at store.slackware.com, and offering a discount if you sign up for a subscription. Consider picking up a copy to help support the project. Thanks again to the Slackware community for testing, contributing, and generally holding us to a high level of quality. :-) Enjoy! --- slackbook/html/file-commands-copymove.html | 166 ----------------------------- 1 file changed, 166 deletions(-) delete mode 100644 slackbook/html/file-commands-copymove.html (limited to 'slackbook/html/file-commands-copymove.html') diff --git a/slackbook/html/file-commands-copymove.html b/slackbook/html/file-commands-copymove.html deleted file mode 100644 index ddb7179a9..000000000 --- a/slackbook/html/file-commands-copymove.html +++ /dev/null @@ -1,166 +0,0 @@ - - - - -Copy and Move - - - - - - - - - - - -
-

10.5 Copy -and Move

- -
-

10.5.1 cp

- -

cp(1) copies files. DOS users will notice its similarity to -the copy command. There are many options for cp , so you should have a look at the man page before using it.

- -

A common use is to use cp to copy a file from one location to -another. For example:

- - - - - -
-
-% cp hejaz /tmp
-
-
- -

This copies the hejaz file from the current directory to the -/tmp directory.

- -

Many users prefer to keep the timestamps preserved, as in this example:

- - - - - -
-
-% cp -a hejaz /tmp
-
-
- -

This ensures that the timestamps are not modified in the copy.

- -

To recursively copy the contents of a directory to another directory, you would issue -this command:

- - - - - -
-
-% cp -R mydir /tmp
-
-
- -

That will copy the mydir directory to the /tmp directory.

- -

Also if you wish to copy a directory or a file and keep all it's old permissions and -time stamps and keep it exactly the same use cp -p.

- - - - - -
-
-% ls -l file
--rw-r--r--    1 root     vlad            4 Jan  1 15:27 file
-% cp -p file /tmp
-% ls -l /tmp/file
--rw-r--r--    1 root     vlad            4 Jan  1 15:27 file
-
-
- -

cp has many more options that are discussed in detail in the -online manual page.

-
- -
-

10.5.2 mv

- -

mv(1) moves files from one place to another. Sounds simple -enough doesn't it?

- - - - - -
-
-% mv oldfile /tmp/newfile
-
-
- -

mv has a few useful command line options that are detailed in -the man page. In practice, mv is almost never used with -commandline options.

-
-
- - - - - -- cgit v1.2.3