Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 10-26-2011, 02:35 PM   #1
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, 02:56 PM   #2
Registered: May 2006
Posts: 36

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, 04:57 PM   #3
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).


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 07:30 PM
How to create an executable in Perl madhi Programming 9 07-16-2009 10:47 PM
How to create a disaster recovery of my files automatically sacoskun Linux - Software 1 04-07-2008 09:49 PM
C compilers cannot create executable enthusiac Linux - Software 3 05-08-2007 01:37 PM
gcc can't create executable Aeion Linux - Newbie 1 04-06-2004 01:03 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:13 PM.

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