View previous topic :: View next topic |
Author |
Message |
Rain Designs Tux's lil' helper
Joined: 01 Jul 2002 Posts: 130 Location: Los Angeles, CA
|
Posted: Sun Dec 22, 2002 4:26 am Post subject: saving with vi |
|
|
n00b here...
how do I save with the text editor vi.
And there is a reason why I'm not using nano!
Thanks
Rain _________________ ^M = Death by notepad
http://www.raindesigns.com |
|
Back to top |
|
|
pjp Administrator
Joined: 16 Apr 2002 Posts: 20067
|
Posted: Sun Dec 22, 2002 4:58 am Post subject: |
|
|
ESC will get you out of editing modes
: will give you the vi prompt
w will write the file
wq will write & quit
Google probably has some more information on vi. _________________ Quis separabit? Quo animo? |
|
Back to top |
|
|
rac Bodhisattva
Joined: 30 May 2002 Posts: 6553 Location: Japanifornia
|
Posted: Sun Dec 22, 2002 5:42 am Post subject: |
|
|
ZZ will also save and quit, and it's easier to type than ":wq<CR>". _________________ For every higher wall, there is a taller ladder |
|
Back to top |
|
|
mooman Apprentice
Joined: 06 Nov 2002 Posts: 175 Location: Vancouver, WA
|
Posted: Sun Dec 22, 2002 6:30 am Post subject: |
|
|
and :q! will quit without saving any changes. Useful when you accidently clobber something. My usual sequence... :q! followed by cursor-up (to get the last vi command again), followed by Enter..
I use this a lot when I fatfinger vi files... (There is a 'U' command that is supposed to undo the last action, but sometimes I've done more than one line of changes...) _________________ Linux user off and on since circa 1995 |
|
Back to top |
|
|
Rain Designs Tux's lil' helper
Joined: 01 Jul 2002 Posts: 130 Location: Los Angeles, CA
|
Posted: Sun Dec 22, 2002 6:31 am Post subject: |
|
|
thanks
one last thing...
lets say I want ALL the files and folders in the folder "temp" to have privledge 775, how do I do this?
I tried to go through ssh and right click on "temp" and setting the privledge to 775 there but, only "temp" had value 775.
Thanks
Rain _________________ ^M = Death by notepad
http://www.raindesigns.com |
|
Back to top |
|
|
mooman Apprentice
Joined: 06 Nov 2002 Posts: 175 Location: Vancouver, WA
|
Posted: Sun Dec 22, 2002 6:40 am Post subject: |
|
|
You say "right click" so I take it you're using a graphical file manager of some sort?
The classical way is just to change to that directory in a shell and do a recursive chmod there, specifically:
Code: | / # cd temp
/temp # chmod -R 755 *
/temp #
|
Is this what you're asking for? _________________ Linux user off and on since circa 1995 |
|
Back to top |
|
|
hook Veteran
Joined: 23 Oct 2002 Posts: 1398 Location: Ljubljana, Slovenia
|
Posted: Sun Dec 22, 2002 6:44 am Post subject: |
|
|
chmod -R 775 temp
or
cd temp; chmod -R 775 *
in vi, use <ESC> ZZ ,it is said to be safer (don't know why or how...but it is said so) _________________ tea+free software+law=hook
(deep inside i'm still a tux's little helper) |
|
Back to top |
|
|
rac Bodhisattva
Joined: 30 May 2002 Posts: 6553 Location: Japanifornia
|
Posted: Sun Dec 22, 2002 7:09 am Post subject: |
|
|
Won't "chmod *" miss files and directories whose name begins with a '.' under default globbing rules? _________________ For every higher wall, there is a taller ladder |
|
Back to top |
|
|
hook Veteran
Joined: 23 Oct 2002 Posts: 1398 Location: Ljubljana, Slovenia
|
Posted: Sun Dec 22, 2002 7:15 am Post subject: |
|
|
nope, tried it and Code: | chmod -R 775 some_dir | works just fine, even with . dirs _________________ tea+free software+law=hook
(deep inside i'm still a tux's little helper) |
|
Back to top |
|
|
Rain Designs Tux's lil' helper
Joined: 01 Jul 2002 Posts: 130 Location: Los Angeles, CA
|
Posted: Wed Dec 25, 2002 4:29 am Post subject: |
|
|
awesome
Thanks for all the help
Rain _________________ ^M = Death by notepad
http://www.raindesigns.com |
|
Back to top |
|
|
rac Bodhisattva
Joined: 30 May 2002 Posts: 6553 Location: Japanifornia
|
Posted: Wed Dec 25, 2002 5:16 am Post subject: |
|
|
hook wrote: | nope, tried it and Code: | chmod -R 775 some_dir | works just fine, even with . dirs | I said that "chmod *" would miss things with names starting with '.', not chmod -R on the parent. _________________ For every higher wall, there is a taller ladder |
|
Back to top |
|
|
hook Veteran
Joined: 23 Oct 2002 Posts: 1398 Location: Ljubljana, Slovenia
|
Posted: Wed Dec 25, 2002 8:39 am Post subject: |
|
|
rac wrote: | I said that "chmod *" would miss things with names starting with '.', not chmod -R on the parent. |
oh ...sorry ...my mistake ...was a bit sleepy at that moment :] _________________ tea+free software+law=hook
(deep inside i'm still a tux's little helper) |
|
Back to top |
|
|
|