LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-26-2011, 01:35 PM   #1
skiabox
Member
 
Registered: Dec 2006
Posts: 44

Rep: Reputation: 0
How to automatically create executable files


Every time I create a perl script using pico editor I have to enter chmod +x filename every time after file creation.
Is there a more easy way to do that?
Thank you.
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 10-26-2011, 01:56 PM   #2
RHTopics
Member
 
Registered: May 2006
Posts: 45

Rep: Reputation: 3
I would create a Bash script to do it.

Use the 'touch' command to create the file, the 'chmod' command to make it executable, and then call the pico editor.
 
2 members found this post helpful.
Old 10-26-2011, 03:57 PM   #3
spankbot
Member
 
Registered: Aug 2007
Posts: 133

Rep: Reputation: 16
This is a security feature. For safety reasons, you don't want every file you create to be executable by default.

You modify your default permissions buy modifying your Umask. (don't do this unless you *really* know what you're doing).

http://www.cyberciti.biz/tips/unders...lue-usage.html
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] cfengine - cannot create executable alanware Linux - Software 9 11-11-2011 06:30 PM
How to create an executable in Perl madhi Programming 9 07-16-2009 09:47 PM
How to create a disaster recovery of my files automatically sacoskun Linux - Software 1 04-07-2008 08:49 PM
C compilers cannot create executable enthusiac Linux - Software 3 05-08-2007 12:37 PM
gcc can't create executable Aeion Linux - Newbie 1 04-06-2004 12:03 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:09 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration