Im new to the world of linux and am trying my hand at some bash scripts. However, everytime i create a new file i also have to edit the permission of the file to be able to execute it.
I create the file either by typing "vi file.sh" or "touch file.sh". Is there another way i should be doing this?
thanxs all
P.S
Anyone know any good editors? I like using Multi Edit when using windows but have never found an editor as good for linux.
To be able to execute a file on a unix system, the file needs to have execute permission. Thats the one of the best features of unix. My favourite editor is vi though pico is also getting popular due to its ease of use.
Is there some reason why files i create are not executable by default? When I create a file it only has user read and write permissions, and i have to do 'chmod 777 file.sh" to chage that.
I make my own scripts using CronJobs which are usually for backup. It's actually very simple to do. The script first creates full SQL backups of each database on site and places it in a folder "root/Backups" which can only be accessed by the owner of site. That way the casual surfer and/or hacker will never be able to access my backups. It then takes a full tarball backup of "public_html" folder. After that, it takes all of the SQL files just created plus the public_html folder and then makes it a single backup tarball. It is extremely fast and efficient. The average backup time is about 5 seconds. It's completely hands off and all I have to do is download a set of backups everyday. It will also FXP a copy of the backup to another server with a little extra work. This process happens every 12 hours and you've gotta love the email feature for cron jobs.
Why not program in the SSH Console?
As for your editor issue, try this: Blumentals HTMLPad 2002 Pro. This is my favorite editor because it is not only extremely robust, fast and efficient. It is also not cluttered in GUI like the others and extremely easy to use while being every bit as powerful...a winning combination.
Utinam logica falsa tuam philosophiam totam suffodiant
05-29-2003 18:10
Title (Optional):
Message:
Convert URLs: Automatically converts internet addresses into links by adding [url] and [/url] around them. Email Notification: Notifies you by email every time there is a new post in this thread.
Deactivate smilies in this post. Add Signature: Displays your signature in this post.