[phpBB Debug] PHP Notice: in file /includes/db/dbal.php on line 110: Undefined array key "cached"
[phpBB Debug] PHP Notice: in file /includes/db/dbal.php on line 111: Undefined array key "normal"
[phpBB Debug] PHP Notice: in file /includes/db/dbal.php on line 112: Undefined array key "total"
[phpBB Debug] PHP Notice: in file /includes/session.php on line 885: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2922)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 885: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2922)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 885: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2922)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3391: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2922)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3393: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2922)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3394: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2922)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3395: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2922)
Cabrillo College Linux Classes • View topic - rename a file

rename a file

Introduction to UNIX/Linux

rename a file

Postby alexa bolas on Wed Nov 19, 2008 5:38 pm

Ok, I am spacing on how to rename a file. I am use to the rename command but does not work for me right now. Any suggestions?
alexa bolas
 
Posts: 30
Joined: Wed Sep 03, 2008 7:28 pm

Re: rename a file

Postby Robert Lyons on Wed Nov 19, 2008 5:39 pm

Use the "move" command: mv filename1 filename2

to rename filename1
User avatar
Robert Lyons
 
Posts: 20
Joined: Wed Sep 03, 2008 7:30 pm

Re: rename a file

Postby katy elliott on Wed Nov 19, 2008 10:18 pm

And it helped me to remember that the old filename goes away.
Here's an example:
I want to rename OldFile to OldFileNewName.
So I type mv OldFile OldFileNewName
then when you do an ls of the directory, 'OldFile' is gone, and 'OldFileNewName' has taken its place.

Probably redundant for you, but I thought I'd share.... :)

Katy
katy elliott
 
Posts: 23
Joined: Wed Sep 03, 2008 7:28 pm

Re: rename a file

Postby Nicholas Gardner on Thu Nov 20, 2008 12:06 am

I always get the cp and mv commands confused and end up wondering why the file I just moved is still where it was before :D . I'm sure I'll remember some day but you could always make an alias like:
alias copy="cp"
alias move ="mv"
but then again that's a whole two more letters to type :roll: .
Nicholas Gardner
 
Posts: 23
Joined: Wed Sep 03, 2008 7:27 pm

Re: rename a file

Postby Jason Meyers on Wed Dec 17, 2008 8:41 pm

i like that idea nicholas, and you would have to make that a static command by inputing it into your .bashrc file
Jason Meyers
 
Posts: 19
Joined: Wed Sep 03, 2008 6:41 pm


Return to CIS 90 - Fall 2008

Who is online

Users browsing this forum: No registered users and 0 guests

cron