Hi i have to edit a file on our UNIX Server, but i have no idea how to do that. The only thing that i managed till now is to get acces to it via ssh. I get into it via Terminal because i use Osx. I have the advice to edit this file:
1 - You must edit this file:
[Ajaxplorer path] / Conf / bootstrap_repositories.php
but how can I edit it via terminal, which commands i have to write to see it and make it editable ?
I know that are really more than basical dummie questions, but I have to ask them.
Use "ls" to list file. Use "vi" to edit it. Attention: "vi" is quite dissimilar to any other editor, so you probably want to read a bit about how it works before you start editing your file.
If you need help for any command issue "man <cmd>" to get help. In most cases there are examples aobut the usage too. Press "CTRL-C" to end the display of the man pages.
One last thing: paths are written without spaces and are case-sensitive, so "Conf" might be "conf", but these two would be not the same:
Hi
View/Edit a file in unix is quite easy indeed.You may like the following to use
1 cat <file_name>
2 cat><filename>
3 vi <filename>
Note that 1st option is to VIEW file only.You will not be able to write in this mode.
2nd and 3rd options make you enable to edit a file.
Be cautious when you edit a file using 3rd option as it may need a bit more knowledge about VI editor prior to use.
But there is no harm in using the 2nd option mentioned above
thanks .
Suggesting redirecting output from the cat utility to edit a file is an EXTREMELY dangerous suggestion for a new user. The first thing that the command:
cat > filename
does is delete everything in the file named filename. The user then has to retype the exact original contents of every line in the original file except for the changes to be made to the single line that you want to change.