nixCraft Linux / UNIX / Shell Scripting Forum

nixCraft

Linux / UNIX Tech Support Forum

how to chmod to run the script

This is a discussion on how to chmod to run the script within the Shell scripting forums, part of the Development/Scripting category; Hi, I have question. where to change the chmod +x in order to run the shell script. Is it in ...


Register free or login to your account to remove all advertisements.

Go Back   nixCraft Linux / UNIX / Shell Scripting Forum > Development/Scripting > Shell scripting

Linux answers from nixCraft.


Shell scripting You can discuss the shell scripting, request shell scripts and scripting techniques

Reply

 

Thread Tools Display Modes
  #1 (permalink)  
Old 22nd August 2008, 02:16 AM
Junior Member
 
Join Date: Jul 2008
OS: Fedora
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
manoharp2008 is on a distinguished road
Default how to chmod to run the script

Hi,

I have question. where to change the chmod +x in order to run the shell script.

Is it in super user mod or user mod. because i am unable to run the script which i write. Also where do you save the script in the shell scripting
Reply With Quote
  #2 (permalink)  
Old 22nd August 2008, 06:48 AM
amitabh's Avatar
Contributors
 
Join Date: Jul 2008
Location: New Delhi
OS: FreeBSD
Posts: 109
Thanks: 0
Thanked 4 Times in 3 Posts
Rep Power: 5
amitabh has a spectacular aura aboutamitabh has a spectacular aura aboutamitabh has a spectacular aura about
Send a message via MSN to amitabh Send a message via Yahoo to amitabh Send a message via Skype™ to amitabh
Default

There is no set rule on where to save the script. If you want the script to be available to all users on your system, save it in /bin or usr/local/bin .

What is the exact error you are receiving while running the file?
Reply With Quote
  #3 (permalink)  
Old 22nd August 2008, 02:10 PM
rockdalinux's Avatar
Is that all you got?
 
Join Date: May 2005
Location: Planet Vegeta
OS: Redhat
Posts: 823
Thanks: 21
Thanked 37 Times in 32 Posts
Rep Power: 12
rockdalinux is a splendid one to beholdrockdalinux is a splendid one to beholdrockdalinux is a splendid one to beholdrockdalinux is a splendid one to beholdrockdalinux is a splendid one to beholdrockdalinux is a splendid one to behold
Default

amitabh is right there are no rules but usually, /usr/local/bin is good start for all users. If you are going to use script for yourself only put inside ~/bin:
Code:
mkdir ~/bin
cp script.sh ~/bin
cd bin
chmod +x script.sh
./script.sh
__________________
Rocky Jr.
What's wrong? I hope I am not making you uncomfortable...

Never send a boy to do a mans job.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads

Thread Thread Starter Forum Replies Last Post
Problem with chmod 777 -R / * ramakrishna CentOS / RHEL / Fedora 1 24th March 2008 09:27 PM


All times are GMT +5.5. The time now is 09:03 PM.


Powered by vBulletin® Version 3.8.6 - Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2
©2005-2010 nixCraft. All rights reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40