Sponsored Content
Operating Systems Solaris How to make a script executable by all users? Post 86858 by networkfre@k on Tuesday 18th of October 2005 04:23:14 AM
Old 10-18-2005
The easy way:

When we´re talking about solaris , the root home dir is /.
So lets assume the script name is /sysinfo.sh

# ln -s /sysinfo.sh /usr/bin/sysinfo

# chmod +x /sysinfo.sh


Now a non root user can run "sysinfo"
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How do I make a cgi script World-executable

I'm trying to set up a form mail script on a website that when Submitted, a cgi script is executed and a perl translator (located in a secured and inaccessible folder) translates the script. After speaking to my hosting provider, I was told to "Telnet into the system and make the script... (2 Replies)
Discussion started by: tylerl
2 Replies

2. Shell Programming and Scripting

make script deleting mp3 with warnig to users

hi i need to make a script that will check the directories of the users on mp3 or mp4 files. if so they must be automaticly deleted and they have to get a warning message instead. this should be running every day at 1 pm and should be done within the cron file. could someone help me with... (2 Replies)
Discussion started by: stefan
2 Replies

3. Shell Programming and Scripting

run and make an executable file

as i said before i'm a beginner in shell programming and i have two questions: how to run an executable file in shell scripts like for example let's say the file called "prog.exe", what's the shell command to run this file? also how can i make the shell file an executable file (if it is... (5 Replies)
Discussion started by: _-_shadow_-_
5 Replies

4. Shell Programming and Scripting

How to make a script (Bash, KornShell, etc.) executable by mouse clicking?

Hello everybody, Is there any way to make a script (Bash, KornShell, etc.) executable by mouse clicking? For example you have a file myscript.sh, you run: $ chmod u+x myscript.sh Therefore it becomes executable and all you need is to run from the terminal: $./myscript.sh... (2 Replies)
Discussion started by: dariyoosh
2 Replies

5. Shell Programming and Scripting

Unable to make script executable

Hello everybody, I'm unable to make my shell script an executable file. The details are as follows: PATH includes my $HOME/bin i.e. /rchome/rc1/bin HOME directory is /rchome/rc1 script name is prep_mig.sh permissions set are 755 It's executing if I give below command sh prep_mig.sh but... (4 Replies)
Discussion started by: jitu.keshwani
4 Replies

6. Shell Programming and Scripting

Make multiple awk files into an executable

Hello everyone, The following are my input files. The following are my sequence of steps. Can someone please let me know about how to make these bunch of steps into a single script so that I start the script with 1.txt and 2.txt, after execution gives me the final... (11 Replies)
Discussion started by: jacobs.smith
11 Replies

7. UNIX for Dummies Questions & Answers

Command - filename as arguments - make executable to all users.

Edit: Sorry. Mistakenly posted - please delete (3 Replies)
Discussion started by: Reddax
3 Replies

8. UNIX for Beginners Questions & Answers

How to make a dynamically linked executable file?

So I have a file called queens.cc and I need to do the following: Compile and make a .o file while specifying that the compiler is to search /student/214/include for system include files. Use g++, link and load .o file to make a dynamically linked executable file called queens and to also... (1 Reply)
Discussion started by: steezuschrist96
1 Replies

9. Shell Programming and Scripting

Bash script make itself executable

Is there a way to make this make itself executable? Thanks. :-) cat > somescript.sh << \EOF #!/bin/bash block_count=$(sudo tune2fs -l /dev/sda1 | awk '/^Block count:/ {print $NF}') reserved_block_count=$(sudo tune2fs -l /dev/sda1 | awk '/^Reserved block count:/ {print $NF}') perl -e... (4 Replies)
Discussion started by: drew77
4 Replies

10. UNIX for Beginners Questions & Answers

How to make a .exe file executable in Linux?

Dear all, I download a .exe file in my current folder called: ukbmd5.exe. I was told to run the command below: ukbmd5 ukb25278.enc to verify the integrity of the files that you have downloaded and the program ukbmd5 has been made available to assist with decrpying ukb25278.enc. while when I run... (1 Reply)
Discussion started by: forevertl
1 Replies
SYSINFO(2)                                                   Linux Programmer's Manual                                                  SYSINFO(2)

NAME
sysinfo - return system information SYNOPSIS
#include <sys/sysinfo.h> int sysinfo(struct sysinfo *info); DESCRIPTION
sysinfo() returns certain statistics on memory and swap usage, as well as the load average. Until Linux 2.3.16, sysinfo() returned information in the following structure: struct sysinfo { long uptime; /* Seconds since boot */ unsigned long loads[3]; /* 1, 5, and 15 minute load averages */ unsigned long totalram; /* Total usable main memory size */ unsigned long freeram; /* Available memory size */ unsigned long sharedram; /* Amount of shared memory */ unsigned long bufferram; /* Memory used by buffers */ unsigned long totalswap; /* Total swap space size */ unsigned long freeswap; /* Swap space still available */ unsigned short procs; /* Number of current processes */ char _f[22]; /* Pads structure to 64 bytes */ }; In the above structure, the sizes of the memory and swap fields are given in bytes. Since Linux 2.3.23 (i386) and Linux 2.3.48 (all architectures) the structure is: struct sysinfo { long uptime; /* Seconds since boot */ unsigned long loads[3]; /* 1, 5, and 15 minute load averages */ unsigned long totalram; /* Total usable main memory size */ unsigned long freeram; /* Available memory size */ unsigned long sharedram; /* Amount of shared memory */ unsigned long bufferram; /* Memory used by buffers */ unsigned long totalswap; /* Total swap space size */ unsigned long freeswap; /* Swap space still available */ unsigned short procs; /* Number of current processes */ unsigned long totalhigh; /* Total high memory size */ unsigned long freehigh; /* Available high memory size */ unsigned int mem_unit; /* Memory unit size in bytes */ char _f[20-2*sizeof(long)-sizeof(int)]; /* Padding to 64 bytes */ }; In the above structure, sizes of the memory and swap fields are given as multiples of mem_unit bytes. RETURN VALUE
On success, sysinfo() returns zero. On error, -1 is returned, and errno is set to indicate the cause of the error. ERRORS
EFAULT info is not a valid address. VERSIONS
sysinfo() first appeared in Linux 0.98.pl6. CONFORMING TO
This function is Linux-specific, and should not be used in programs intended to be portable. NOTES
All of the information provided by this system call is also available via /proc/meminfo and /proc/loadavg. SEE ALSO
proc(5) COLOPHON
This page is part of release 4.15 of the Linux man-pages project. A description of the project, information about reporting bugs, and the latest version of this page, can be found at https://www.kernel.org/doc/man-pages/. Linux 2017-09-15 SYSINFO(2)
All times are GMT -4. The time now is 07:42 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy