One Day One Cmd

Place for playing with commands…

Day 8 : $ cp

ODOC : $ cp source_file_path destination_file_path.This copy cmd helo to copy one file from one directory to another directory. To copy the whole directory content, we need to use -r as option.
eg: $ cp a.txt b.txt cmd will copy the content of a.txt into b.txt and saved into the current directory itself.
$ cp -r /home/arul/photos /home/arul/fun/old_photos. This cmd will copy the contents of photos folder into fun directory and rename it into ‘old_photos’. 🙂

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: