Sponsored Content
Top Forums UNIX for Dummies Questions & Answers How to execute a command on UNIX? Post 302321180 by robsonde on Saturday 30th of May 2009 08:41:08 PM
Old 05-30-2009
with is a secure copy command.
going from one server to another.

on command line type:
Code:
man scp

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

execute command unix with java:possible or not?

hi everybody, i have a small unix script and i want to use it with java, so how can i executte unix command with java (if it is possible): in fact i want to use some values returned by this script with java swings. is it possible (of course everything is possible) but how can i do? thank you in... (4 Replies)
Discussion started by: mips
4 Replies

2. Shell Programming and Scripting

To execute next UNIX command after ending SFTP process.

Hi, I am trying to run a simple UNIX command after i successfully executed SFTP command as shown below. ----------------------------------------- echo 'Step-1' sftp -vvv -b path exit echo 'Step-2' ------------------------------------------ In above script it executes from the 1st... (3 Replies)
Discussion started by: gautamc
3 Replies

3. Programming

execute unix command from java eclips

Hi all, I tried to execute the command by 2 ways : 1) Java Runtime class exec method - but the problem there is that it only can execute scripts without arguments(I need with args) 2) the Jtux classs Uprocess- the problem it is not supported by windows and my eclips platform is on... (0 Replies)
Discussion started by: katzs500
0 Replies

4. Shell Programming and Scripting

Net::SSH::Perl->Execute any unix command & display the output in a proper form

Net::SSH::Perl ...... how to print the output in a proper format my $cmd = "ls -l"; my $ssh = Net::SSH::Perl->new($host); $ssh->login($user, $pass); my($stdout, $stderr, $exit) = $ssh->cmd("$cmd"); print $stdout; the script works fine, but i am unable to see the output... (2 Replies)
Discussion started by: gsprasanna
2 Replies

5. Shell Programming and Scripting

Execute unix command from an html page in windows

i have a problem situation, where i have a html file say click.html. i have a button "ls" in that html page. i run this html file in windows....Now say if i click that "ls" button it must connect to the unix server and execute ls and return the results back to html page in windows. can anyone tell... (8 Replies)
Discussion started by: niteesh_!7
8 Replies

6. Shell Programming and Scripting

Execute a unix command

Hi, Please suggest me to execute unix command. Input : 2011-01-01 00:00:00 Required output : 20110101000000 YYYYMMDDHH24MISS Regards Akshu (4 Replies)
Discussion started by: akshu.agni
4 Replies

7. Shell Programming and Scripting

How to execute PMCMD command in Unix?

Hi All, I am trying to run the PMCMD commend to execute the informatica workflow but while executing from my home directory i am getting below error ksh: pmcmd: not found I executed from my server/bin directory too. I am getting the same error. My commend is: pmcmd startworkflow -sv... (3 Replies)
Discussion started by: kannansr621
3 Replies

8. Shell Programming and Scripting

Cannot execute Unix command in a simple perl script

Am trying to lean perl scripting in Unix OS to automate my tasks. Please find the below perl script i have tried #!/usr/bin/perl -w print "Please Enter the VG name to be checked:"; $A = <>; print "Please Enter the free size to be checked in GB:"; $B = <>; $vgcheck = `vgdisplay... (7 Replies)
Discussion started by: jayachandran87
7 Replies

9. UNIX for Dummies Questions & Answers

Execute a command in different directory through Unix Script

Hi Gurus, I have the below requirement, Execute an unix script which will pick the latest file from the archive directory and do a grep (on multiple patterns) on that file. processingDir="/usr/apps/irdc/informatica/spsf_sales/TgtFiles/ARCHIVE" filename = 'ls Check* | sort -n -k 2 |... (6 Replies)
Discussion started by: diva_thilak
6 Replies

10. Shell Programming and Scripting

How to execute previous command in UNIX?

Hi, I was able to use !! on the console. But when I used !! in the run.sh, it says something like command not found. (3 Replies)
Discussion started by: alvinoo
3 Replies
shmctl(2)							System Calls Manual							 shmctl(2)

NAME
shmctl - Performs shared memory control operations SYNOPSIS
#include <sys/shm.h> int shmctl( int shmid, int cmd struct shmid_ds *buf); Application developers may want to specify #include statements for <sys/types.h> and <sys/ipc.h> before the one for <sys/shm.h> if programs are being developed for multiple platforms. The additional #include statements are not required on Tru64 UNIX systems or by ISO or X/Open standards, but may be required on other vendors' systems that conform to these standards. STANDARDS
Interfaces documented on this reference page conform to industry standards as follows: shmctl(): XSH4.2 Refer to the standards(5) reference page for more information about industry standards and associated tags. PARAMETERS
Specifies the ID of the shared memory region. Specifies the type of command. The possible commands are: IPC_STAT, IPC_SET, IPC_RMID, SHM_LOCK, and SHM_UNLOCK. Specifies the address of a shmid_ds structure. DESCRIPTION
The shmctl() function provides a variety of shared memory control operations as specified by the cmd parameter. The cmd values and their operations are as follows: Queries the shared memory region ID by copying the contents of its associated shmid_ds data structure into the buf structure. Sets the shared memory region ID by copying values found in the buf structure into corresponding fields in the shmid_ds structure associated with the shared memory region ID. The fields are set as follows: The shm_perm.uid field is set to the owner's user ID. The shm_perm.gid field is set to the owner's group ID. The shm_perm.mode field is set to the access modes for the shared memory region. Only the low-order nine bits are set. Removes the shared memory region ID and deallocates its associated shmid_ds structure. [Tru64 UNIX] Locks the shared memory segment specified by shmid in memory. [Tru64 UNIX] Unlocks the shared memory segment specified by shmid in memory. The shmid_ds structure is used only with the IPC_STAT and IPC_SET commands. In either case, the calling process must have allocated the structure before making the call. [Tru64 UNIX] The SHM_LOCK and SHM_UNLOCK commands can be used to lock (wire) down a shared segment in memory to prevent it from being paged out. NOTES
[Tru64 UNIX] When using the SHM_LOCK command, make sure that the system has enough physical memory available for the shared segment to be wired without exceeding the system-wide limit or otherwise severely impacting system performance. [Tru64 UNIX] The SHM_LOCK operation wires all the pages in a global shared segment and prevents the pageout daemon from reclaiming any of the pages. This can potentially lead to thrashing. RESTRICTIONS
The following restrictions apply to the shared memory commands: For the IPC_SET and IPC_RMID commands, the effective user ID of the calling process must be equal to that of superuser or equal to the value of shm_perm.cuid or shm_perm.uid in the associated shmid_ds structure. [Tru64 UNIX] For the SHM_LOCK and SHM_UNLOCK commands, the effective user ID of the calling process must be equal to that of superuser. RETURN VALUES
Upon successful completion, a value of 0 (zero) is returned. If the shmctl() function fails, a value of -1 is returned and errno is set to indicate the error. ERRORS
The shmctl() function sets errno to the specified values for the following conditions: The cmd parameter is IPC_STAT, but the calling process does not have read permission. [Tru64 UNIX] The cmd parameter is SHM_LOCK, and the system-wide wire limit has been exceeded. [Tru64 UNIX] The cmd parameter is IPC_STAT or IPC_SET. An error occurred in accessing the buf structure. The shmid parameter does not specify a valid shared memory region ID, or cmd is not a valid command. [Tru64 UNIX] The cmd parameter is SHM_UNLOCK, and the segment was not locked. The cmd parameter is equal to either IPC_RMID or IPC_SET, and the calling process does not have appropriate privilege. RELATED INFORMATION
Functions: shmat(2), shmdt(2), shmget(2) Data structures: shmid_ds(4) Standards: standards(5) delim off shmctl(2)
All times are GMT -4. The time now is 08:15 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy