whats the open command?
what is the command to open something if i know the directory of it?
|
If its in your users path, simply type the name of it.
If its not in your users path, type the whole path out to the command or cd into the directory and then type ./command-name |
umm none of that worked
|
im in the /etc directory and when i type in ./inittab it tells me permission denie.... but im in root... i have to know how to do this thru command line not thru the file browser...
anyone who can help please do thanks |
Quote:
If you want to edit text files, you need to use vi or pico or any other editor of your choice to edit them. Simply after cd'ing into the /etc directory: vi inittab or pico inittab Will open the text file to edit and save. And before you ask how to use these console text editors, please use the search button on this site, these are very basic questions which have been asked many many times. Regards. |
sorry and thanks
|
what do you mean by 'open'? Do you mean open it in an editor? If so,
vi {filename} will open it in vi. {filename} can be the full path or just the name if you are in the directory where it is; e.g. vi /etc/inittab or just vi inittab if you are in /etc. You can use emacs {filename} to open it using emacs or kedit {filename} to open it in kedit or konqueror {filename} to open it using konqueror, etc. edit oops, must've been typing when trickykid posted. |
You need to be more specific when you say you want to 'open' something, first off, to simply view a text file use the 'cat', 'more' or 'less' command. If you want to edit the text file use vi or whatever editor you prefer. To run a script or executable file that's not in your path you would use ./executable_name.
The inittab file in your example is a straight text file, unless you've done something funny to it and made it executable. To be more specific: if you just want to view the file. cat /etc/inittab or less /etc/inittab or more /etc/inittab if you just want to edit the file: vi /etc/inittab make sure you have some understanding of exiting vi before dong this or you'll become quickly frustrated and press the reset button. |
We all got in didn't we. Feel bombarded? Must be a good feeling then
|
when i vi to the inittab file it brings it up but i cant edit it, i can move my cursor all around in there but i cannot change anything
|
you have to be root for inittab and other files not in your home directory. Use
su to become root and then open it. |
im already root.... i logged in as root
|
Quote:
man vi for more details. Some quick hints about vi since you seem to not search the site like I asked nicely: ESC = Takes you back to command mode. I = Puts you in Interactive mode so you can type, edit, delete contents of the file. After you go into Interactive mode to edit by pressing I, you will then edit by moving your arrow keys over what you want to edit in the file, etc. Then you type ESC to go back to command mode and from there you can simply type: qw! That will quit and write to the file the changes made. |
thank you and sorry, and ya i did search.... but the I thing works i changed the id from 5 to 3, but when i hit the ESC buttton, it doesnt do anything
|
It might not look like anything happens when you hit ESC but you should be back to command mode. Press the sequence
:w and see if it saves the changes and then :q to quit the program. BTW, are you sure you want to change the default runlevel to 3? If you do, you'll have to deal with the command line and use startx to start gui. If all you want to do is terminate X temporarily to install something, you init 3 or telinit 3 as root to get out of X. You can restart X with init 5 or telinit 5 |
i guess which ever way is easier... i just need to close my x server so i can install my graphics driver
|
ok i did it and now im back.... so thanks for all your help... sorry i was a pain in the ass
|
i just read all this but....i doubt anyone here felt that u were a pain in the ass. this is what we come here for.
|
All times are GMT -5. The time now is 02:30 AM. |