Computer Science Fundamentals Operating Systems Subjective
Mar 12, 2013

How do you rename or move a file in UNIX system

Detailed Explanation

You can rename or move file with ‘mv’ command.
Syntax-
mv [options] [old filename] [new filename]
Common Options
-i        interactive (prompt and wait for confirmation before proceeding)
-f        don’t prompt, even when copying over an existing target file (overrides -i)
Examples
% mv <old filename> <new filename>
Now you have a file called <new filename> and the file <old filename> is gone or deleted.
The contents of the file remain where they were

Discussion (0)

No comments yet. Be the first to share your thoughts!

Share Your Thoughts
Feedback