Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

what is the best way to edit scripts on the server?

Discussion in 'General Discussion' started by ljwhite, Jun 9, 2006.

  1. ljwhite

    ljwhite Well-Known Member

    Jun 20, 2005
    Likes Received:
    Trophy Points:
    Sometimes i will download the scripts on the server, and edit using a windows program (notepad, word, wordpad), and then upload them back to server. But recently i notice this method is wrong and will cause problem. Sometimes they are not the same when they are copied back.The major difference is that Windows writes newlines differently. It ends a line with a NEWLINE and a CARRIAGE RETURN character. 2 Bytes basically. Linux uses only a NEWLINE for newlines.
    So what is the best way for a windows user to edit scripts on the server?
    Many thanks in advance!
  2. PWSowner

    PWSowner Well-Known Member

    Nov 10, 2001
    Likes Received:
    Trophy Points:
    ON, Canada
    If you use an FTP program and it uploads and downloads in ascii mode, that's not a problem because the uploading and downloading converts the return characters between Windows and Linux. You're probably using binary mode.

    If you have shell access, you could edit the files with nano, pico, vi, or other shell editors. You could also just edit them in cPanel File Manager.
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice