PDA

View Full Version : renaming directory's in SSH



uk_joker2003
01-05-2004, 08:31 AM
Hi,

Could anyone tell me how to rename a directory in ssh?

Thanks in advance

l0rdphi1
01-05-2004, 08:38 AM
rename {current} {new} {current}

S2S-Robert
01-05-2004, 10:42 AM
or


mv {old} {new}

At least that's what I've been using :)

uk_joker2003
01-05-2004, 11:22 AM
thanks very much

S2S-Robert
01-05-2004, 11:58 AM
For more bash commands check out:

http://www.ss64.com/bash/index.html
http://www.die.net/doc/linux/man/

ProWebUK
01-05-2004, 12:34 PM
And if you want more basic help with shell commands check the server checklist link in my sig.... a section dedicated to shell software, using shell and basic shell commands :)

I am also considering putting up a beginners guide to SSH on the forums for beginners :)

Chris

uk_joker2003
01-05-2004, 12:57 PM
chris and everyone else,

Thanks for your help. I feel very silly asking such stupid questions but it's good to recieve such help...

uk_joker2003
01-06-2004, 01:48 AM
sorry for asking again.

I have looked through the links given but couldnt find any info about deleting directorys.

I have tried

dele
del
delete
rmd

i trying to get me squirrelmail working i have created a few renamed directiores and would like to remove them.

Thanks in advance

Phil

S2S-Robert
01-06-2004, 03:39 AM
Once again: http://www.ss64.com/bash/index.html

CTRL+F "remove" will get you eventually to



rmdir

ProWebUK
01-06-2004, 03:47 AM
to remove anything can be done using the 'rm' command.

rm -rf /directory

flags used in the above:

r - recurrsive
f - force

you can also use:

rm -r /directory

although you will be asked to confirm each file to be deleted manually (press y for each file)

removing files is basically the same without the need for the 'r' flag

rm -f file

will automatically remove a file

rm file

will request you to confirm that the file is being removed.

Chris

uk_joker2003
01-06-2004, 03:50 AM
thanks i had just worked that out.. I really appreicate all the help. It's really nice to feel that people with little experience are helped here.

I have taken over a deciated server and am on a VERY steep learning curve....

DirectAdmin Support
01-06-2004, 09:30 AM
Remember...

"Unix is simple, but it takes genious to understand the simplicity"

:D

John

ProWebUK
01-06-2004, 10:03 AM
Originally posted by DirectAdmin Support
Remember...

"Unix is simple, but it takes genious to understand the simplicity"

:D

John

I like it! lol

l0rdphi1
01-06-2004, 11:03 AM
hahaa :D