I need to edit a xml file in a server. How can I navigate to the path where the file is present in the server and edit it using putty commands. I am new to unix so if anyone could help me out.
Asked
Active
Viewed 1.5k times
0
-
1[PuTTY](https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html) is just a SSH client. Apart from establishing a connection to the server and moving the data back and forth, there is nothing it can help you with. What you need is a Linux/Unix tutorial. – axiac Aug 14 '17 at 08:54
1 Answers
0
To move around in linux you need to use the change directory command which is: cd /location/of/directory/
. If you then need to edit a file there are a number of editors which you can use. My preference is VIM which can be used by doing the following vi file.xml
. Although VIM is not recommended if you are new to unix. Try using nano filename.xml
instead if this makes it easier for you.
If you wish to edit a file directly without having to move to it's directory you can just do: nano /path/to/file.xml

Lewis Browne
- 904
- 7
- 23
-
Vim is an inbuilt editor which will be installed on your Unix server (although some people install it on their workstation to use as their text editor). – Lewis Browne Aug 14 '17 at 08:56
-
@harshit-naik this is a trap! Before starting `vi` read this post: https://stackoverflow.com/q/11828270/4265352 :-D – axiac Aug 14 '17 at 08:57
-
1
-
Ok I will take your suggestion too @axiac.. I have task of editing a xml file in a server. Instead of dragging the file to my desktop each time to edit and to upload it back. I want to figure out a way to edit it inside the server.Can anyone help with this? – Harshit Naik Aug 14 '17 at 09:02
-
-
Lemme try it out. Will get back to you if I have issues @Lewis Browne – Harshit Naik Aug 14 '17 at 09:05
-
-
@Lewis Browne can u help with exact commands. I have used the cd command to navigate to the file path.What next? – Harshit Naik Aug 14 '17 at 09:08
-
You shouldn't need to, once you are in the directory of the file then do: `nano filename.xml`. – Lewis Browne Aug 14 '17 at 09:22
-
-
-
Then it's not installed, what operating system is your Unix server? – Lewis Browne Aug 14 '17 at 09:39