Sponsored Content
Full Discussion: Help with shell commands
Top Forums UNIX for Dummies Questions & Answers Help with shell commands Post 302589022 by methyl on Tuesday 10th of January 2012 01:19:40 PM
Old 01-10-2012
If you only have one session "ps" with no parameters is enough providing that you have not started anything in background under your login name.

If say you want to find every process running under user "root", the "ps" command after logging in as "root" will only mention the commands for that session whereas "ps -furoot" will show every process running under user root.
This User Gave Thanks to methyl For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

KORN Shell - Spawn new shell with commands

I want to be able to run a script on one server, that will spawn another shell which runs some commands on another server.. I have seen some code that may help - but I cant get it working as below: spawn /usr/bin/ksh send "telnet x <port_no>\r" expect "Enter command: " send "LOGIN:x:x;... (2 Replies)
Discussion started by: frustrated1
2 Replies

2. Shell Programming and Scripting

How to run unix commands in a new shell inside a shell script?

Hi , I am having one situation in which I need to run some simple unix commands after doing "chroot" command in a shell script. Which in turn creates a new shell. So scenario is that - I need to have one shell script which is ran as a part of crontab - in this shell script I need to do a... (2 Replies)
Discussion started by: hkapil
2 Replies

3. UNIX for Dummies Questions & Answers

UNIX Shell Commands Help . . .

I need to know these UNIX Shell Commands with the appropriate parameters. List the files in current directory beginning with extension .har. (% ls .har) View text file "hosts.copy" which spans multiple screens. Execute the batch file "tapeeject.bat" Copy all files from current... (2 Replies)
Discussion started by: pilgrimnoir
2 Replies

4. UNIX for Dummies Questions & Answers

what are some different commands in c shell and korn shell??

I am doing this simple script using c shell and korn shell. The commands I use are fgrep , ls, and also some redirecting. Is there any difference in using both of these commands in c shell and korn shell? Thanks and sorry for the stupid question. (1 Reply)
Discussion started by: EquinoX
1 Replies

5. Shell Programming and Scripting

Shell commands

Hey, I have two seperate files with a column og data about item 277 and 289 in each. Fx: 277 -1.34534 -0.98272 0.12293 etc and 289 -4.58493 9.88273 9.33829 etc. How do i get the second input for item 277 (i.e. -.098272) and add or subtract it from the similar second input from... (2 Replies)
Discussion started by: Wenani
2 Replies

6. Shell Programming and Scripting

Can BASH execute commands on a remote server when the commands are embedded in shell

I want to log into a remote server transfer over a new config and then backup the existing config, replace with the new config. I am not sure if I can do this with BASH scripting. I have set up password less login by adding my public key to authorized_keys file, it works. I am a little... (1 Reply)
Discussion started by: bash_in_my_head
1 Replies

7. Shell Programming and Scripting

Logical AND in shell commands

Hi:confused:, I have a file that contains : +-----------------------------------------------------------------------------+ LABEL: super1_fix EFIX FILES: 1 ABSTRACT: epkg for touch command PRE-REQUISITES: no PACKAGER VERSION: 7 REBOOT REQUIRED: no BUILD BOOT... (4 Replies)
Discussion started by: vijaya2006
4 Replies

8. Shell Programming and Scripting

Help in shell commands

Hi, I am working on HP-AUX Unix machine. I need to find a file whether it has been updated in 15 minutes. Please help me with the command. I am using Ksh (1 Reply)
Discussion started by: chinniforu2003
1 Replies

9. Shell Programming and Scripting

Any shell or hack that makes the shell command line take vi commands?

basically i'm tired of hitting the left arrow a few dozen times when correcting a mistake or modifying a history command i'd like to use vim style key shortcuts while on the command line so that a 55 moves the cursor 55 places to the left... and i want all the other vi goodies, search of... (3 Replies)
Discussion started by: marqul
3 Replies

10. Shell Programming and Scripting

Execution of Shell Commands

I have a question: Where would I put the Command line (of any command) so that it executes every time I log on? Where would I put it if I want it to execute every time I start a new shell? (5 Replies)
Discussion started by: Nabeel Nazir
5 Replies
MACH_INIT(8)						    BSD System Manager's Manual 					      MACH_INIT(8)

NAME
mach_init -- Mach service naming (bootstrap) daemon SYNOPSIS
mach_init [-D] [-d] [-F] [-r name-in-existing-server] DESCRIPTION
mach_init is a daemon that maintains various mappings between service names and the Mach ports that provide access to those services. Clients of mach_init can register and lookup services, create new mapping subsets, and associate services with declared servers. The mach_init daemon will also be responsible for launching (and/or re-launching) those service providing servers when attempts to use one or more of the associated services is detected. The options are as follows: -D When the -D option is specified, mach_init starts in normal (non-debug) mode. Logging is minimal (only security-related and process launch failures are logged). Core dumps are disabled for launched servers. This is the default. -d When the -d option is specified, mach_init starts in debug mode. Logging is extensive. Core dumps will be taken for any launched servers that crash. -F When the -F option is specified, mach_init forks during initialization so that it doesn't have to be put in the background manually by the caller. -r Using the -r option tells mach_init to register itself in a previously running copy of mach_init under the service name name-in-existing-server. This is most useful when debugging new instances of mach_init itself, but can also be used for robustness or to allow the subsequent mach_init processes to run as a non-root user. As mach_init is often used to launch servers, this could be more secure. However, mach_init will not allow a server declaration to specify a user id different than that of the requesting client (unless the client is running as root). So it shouldn't be required for a secure configuration. Access to mach_init is provided through the bootstrap series of RPC APIs over service ports published by mach_init itself. Each Mach task has an assigned bootstrap port retrieved via task_get_bootstrap_port(). These bootstrap port registrations are inherited across fork(). The service registrations are grouped into subsets, providing a level of security. Only processes with access to the subset's bootstrap port will be able to register/lookup Mach ports within that subset. Lookups from within a subset will search the subset first, then move on to its parent, and then its grand-parent, etc... until a string name match is found or the top of the bootstrap tree is reached. Subsets are sometimes associated with login sessions to protect session-specific ports from being exposed outside the session. The first instance of mach_init is responsible for launching the traditional BSD process control initialization daemon (/sbin/init). SAMPLE USAGE
mach_init -d -r com.company.bootstrap mach_init will start in debug mode, and register itself in an already running instance of mach_init under the service name com.company.boot- strap. NOTE
Sending a SIGHUP to a running mach_init will toggle debug mode. SEE ALSO
init(8) Mac OS X March 20, 2002 Mac OS X
All times are GMT -4. The time now is 08:28 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy