Thursday, April 2, 2015

Renaming and Moving files ,directories in ubuntu

Moving/Renaming Files and Directories


mv       Move or rename files & Directories.

mv source destination

mv -i source destination

To get better understanding.
Create two files and two directories on your Desktop.

files --file1 file2

directories -- blog-promotion backup 

File Renaming

cam@hack3r:~/Desktop$ mv file1 file2

It renamed file1 --> file2 but there's file with same name so it is deleted.

A File moving into a Directory.

cam@hack3r:~/Desktop$ mv file2 backup

This command moves file2 into backup Directory.

A Directory being moved into a Directory

cam@hack3r:~/Desktop$ mv backup blog-promotion

This moves backup folder into blog-promotion.Since both are in Desktop directory we ddn't specify any path.

Learn python for fun.The popular blog with questions and answers to the python.Solutions to facebookhackercup,codejam,codechef.The fun way to learn python with me.Building some cool apps.

No comments:

Post a Comment