Whats The Command To Change Or Rename Files In Linux Shell Commands
Post Description: whats the command to change or rename files in linux shell commands
whats, the, command, to, change, or, rename, files, in, linux, shell, commands
This Post Has Been Viewed 214 Times Since Fri Feb 29, 2008 12:01 pm Posted By apck with 1 replies
POST# 968
Posted On: Fri Feb 29, 2008 12:01 pm
Topic: Whats The Command To Change Or Rename Files In Linux Shell Commands
hi, i need to rename a file in my linux shell, can you tell me how can rename a file?
i have a file called myusers.php and i want to change it to mynewusers.php
thnkas
Thu Jun 21, 2007 11:59 am
1
hostman
Reply #1694
yup,
its easy to do to rename the file you are talking about here, this is the commmand:
mv myusers.php mynewusers.php
here are more instructions:
NAME
mv - move (rename) files
SYNOPSIS
mv [OPTION]... [-T] SOURCE DEST
mv [OPTION]... SOURCE... DIRECTORY
mv [OPTION]... -t DIRECTORY SOURCE...
DESCRIPTION
Rename SOURCE to DEST, or move SOURCE(s) to DIRECTORY.
Mandatory arguments to long options are mandatory for short options
too.
--backup[=CONTROL]
make a backup of each existing destination file
-b like --backup but does not accept an argument
-f, --force
do not prompt before overwriting
-i, --interactive
prompt before overwrite
--strip-trailing-slashes remove any trailing slashes from each SOURCE
argument
-S, --suffix=SUFFIX
override the usual backup suffix
-t, --target-directory=DIRECTORY
move all SOURCE arguments into DIRECTORY
-T, --no-target-directory
treat DEST as a normal file
-u, --update
move only when the SOURCE file is newer than the destination
file or when the destination file is missing
-v, --verbose
explain what is being done
--help display this help and exit
--version