01-21-2011
Mac 10.6.6
(This is just hobby/personal use. I'm on a mac (10.6.6). I have been strictly Windows since 3.1 and I'm trying to get more familiar with what my mac is able to do. I know i'm able to open the terminal app and interface using unix commands, but I don't really know unix at all. I know there's tons of apps for macs to do simple things but are just wasting space and processing so I figured, I might as well learn the OS because that should cover about 90% of those apps. I don't prefer wasting system resources either, so I want to get optimal use out of my system. I really dig apps that use the system properly, and cleverly, rather than rewriting functions to do what's already available thru calling system commands.)
methyl: thanks for the reply. I was playing around with shell scripting trying to figure it out. I was under the impression that I could call unix commands like I would call functions in a oop language, then pipe commands together to get like a variable out of the output, then feed that into some other unix command. Am I looking at this the wrong way?
i.e. in the shell:
command (feed result to) search_for_result_from_previous_command (feed result to) echo_to_standard_output
You can do this sort of thing with unix, right? Because I can imagine endless possibilities with a system like this.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
shouldn't they give the same output?
echo `echo \`date\``
is the same as the command date
echo `echo date`
prints the word date
thanks! (3 Replies)
Discussion started by: kfad
3 Replies
2. Solaris
Hi,
I would like to know what is the difference between executing the mount command in the following ways...
eg:
/usr/sbin/mount -F <something>
AND
mount -F <something>
I mean , just executing the mount command as opposed to specifying the path and then executing it?
... (3 Replies)
Discussion started by: wrapster
3 Replies
3. UNIX for Dummies Questions & Answers
Hello All, I have a question about the difference between two commands. I am using Korn and was told by the Unix admin that 'nohup <command> &'
equals 'nohup ./<command> &. That there is no difference betwewen the two. Is this true? Also, does the command './<command> &' provide a disconnect... (4 Replies)
Discussion started by: grin1dan
4 Replies
4. Shell Programming and Scripting
Good morning!
What is the difference between:
ssh-keygen -t rsa
and
ssh-keygen -b 2048 -t rsa?
Thanks
Bigben (2 Replies)
Discussion started by: bigben1220
2 Replies
5. Shell Programming and Scripting
HI all,
Please clarify the difference between the following
pm2srv:/var/opt/temip/vf/scripts/saiki#awk '{RS = ":"} ; {print $0}' testf2
hey:wasup:howru:
Yes
I
am
fine
pm2srv:/var/opt/temip/vf/scripts/saiki#awk 'BEGIN { RS = ":" } ; { print $0 }' testf2
hey
wasup
howru
Yes
I... (0 Replies)
Discussion started by: saiki
0 Replies
6. Shell Programming and Scripting
Hi,
I need to know the difference between this commands:
grep * *search*
grep "*" *search*
As far as i know does the 2nd command search for files which have a name with *search* and greps then all which have chars from a-z in the file content.
But was does the first command??
Best... (1 Reply)
Discussion started by: xus
1 Replies
7. Solaris
Looking at the performance hit on my server, does it matter wich command I run?
client # rsh server tar –cf - . | tar –cv –f –
or
server # tar –cf – . | rsh client ‘cd target && tar –xv -f –‘
I think it doesn't really matter because both command strings involve a tar being run on... (4 Replies)
Discussion started by: petervg
4 Replies
8. AIX
Hi all,
I'm new in this forum.
I'm looking for the difference between the HACMP commands with the prefix "cl" and "cli".
The first type are under /usr/es/sbin/cluster/sbin directory and the second are under /usr/es/sbin/cluster/cspoc directory.
I know that the first are called HACMP for AIX... (0 Replies)
Discussion started by: peppix
0 Replies
9. Shell Programming and Scripting
Hi all I want to make sure I was understanding this correctly
if a cron job command was
* */20 * * * command
does that mean this command will run every 20 hours?
also what is the difference between the following two?
0,20,40 * * * * command
20 * * * * command
I believe the first... (3 Replies)
Discussion started by: subway69
3 Replies
10. Solaris
i need to know the difference between two commands
ps -ef|grep oracle
ps -ef|grep -v grep |grep oracle (1 Reply)
Discussion started by: smazshah
1 Replies
LEARN ABOUT MOJAVE
safeejectgpu
SafeEjectGPU(8) BSD System Manager's Manual SafeEjectGPU(8)
NAME
SafeEjectGPU -- Facilitate safe eject/disconnect of eGPU(s) from system
SYNOPSIS
SafeEjectGPU [gpuid <gpuid>] [gpus] [apps] [status] [Eject] [Initiate] [Relaunch] [Finalize] [Cancel] [RelaunchPID <PID>] ...
DESCRIPTION
The SafeEjectGPU command is used to prepare for safe eject/disconnect of eGPUs from the system. This involves interacting with apps to
migrate off of ejecting eGPU(s), and triggering the eject itself. This tool can also be used to view what GPUs are attached to the system,
their eject status, and what apps hold references to each.
A list of commands and their descriptions - note that commands affecting state are capitalized, and that multiple (including repeated) com-
mands can occupy the same command line:
gpus Lists attributes of GPUs currently attached to system (gpuid, vendor/model, flags)
gpuid <gpuid> Specifies which GPU(s) subsequent commands apply to. The default (0x0000) means all eGPUs. See output of gpus command
for valid <gpuid> values (of the form 0x7005) to use.
apps Lists apps holding references to specified GPU - and app attributes/properties like PID, RPID, USER, PROCESS, APIS (Metal,
GL/CL, GVA), BUNDLE_IDENTIFIER, PATH, GPUEjectPolicy and GPUSelectionPolicy where specified.
status Shows eject state of specified eGPU(s) (Present, Initiated, Finalized).
Eject Performs the full Eject sequence ( Initiate + Relaunch + Finalize ) of specified GPU(s).
Initiate Initiates eject of specified eGPU(s). These eGPUs are temporarily hidden from API instantiations.
Relaunch Interacts with apps that hold references to specified eGPU(s) - to facilitate migration to remaining GPUs.
Finalize Finalizes eject of specified eGPU(s) - must be physically unplugged before they can be used again.
Cancel Cancels initiated eject of specified GPU(s) - instead of Finalized.
RelaunchPID <PID> Apply relaunch stimulus to one particular PID - for app relaunch stimulus testing.
EXAMPLES
$ SafeEjectGPU gpus
List eGPUs. Output is useful for cut-n-paste of example specified gpuid values used below $ SafeEjectGPU gpus apps status
List all eGPUs and Apps on all eGPUs along with eject status of all eGPUs
$ SafeEjectGPU Eject
Perform full Eject sequence on all eGPUs
$ SafeEjectGPU gpuid 0x7005 Eject
Perform full Eject sequence on specified eGPU
$ SafeEjectGPU gpus apps gpuid 0x7153 apps
Lists all eGPUs and apps on all eGPUs and on integrated GPU as well
$ SafeEjectGPU Initiate RelaunchPID 12345 Cancel
Hide eGPUs and send relaunch stimulus to PID without doing full eject
PLIST PROPERTIES
The following properties are generally inferred. Some values can be specified in the app's Info.plist. They affect eGPU eject and API
selection behaviors. Generally, these properties won't need to be specified:
GPUEjectPolicy
Inferred/Settable GPUEjectPolicy values for dealing with apps that needs to drop references to ejecting eGPU. Establisehd in app
bundle's Info.plist. Possible values:
relaunch Send AppKit quit-with-save event followed by open-with-restore (relaunch app using alternate GPU(s)).
wait Just wait for GPU references to drop (without sending events or signals).
kill Use sigKill to force app exit (for apps that will relaunch via launchd - using alternate GPU(s)).
ignore Ignore - necessary for some internal GPU/display components - working to eliminate its use.
Inferred-Only GPUEjectPolicy values (you can't specify these values, but you'll see them as defaulted/inferred policies in apps out-
put):
wrelaunch Wait momentarily for processing of Metal GPU change notifications before resorting to relaunch
(as necessary).
jrelaunch Just relaunch
without waiting (since OpenGL/OpenCL are in use).
rwait When a process is subordinate to another, "responsible", process (see RPID column), Eject actions apply to the responsible
process, who in turn deals with subordinates to eliminate their ejecting eGPU references.
GPUSelectionPolicy
Settable values that affect instantiation of Metal and OpenGL/CL contexts (wrt eGPU use). Established in app bundle's Info.plist.
Possible values:
avoidRemovable Avoid creation of MTLCommandQueues, and OpenGL/CL contexts on eGPUs.
preferRemovable Prefer creation of MTLCommandQueues, and OpenGL/CL contexts on eGPUs.
SEE ALSO
plist(5) sudo(8) launchd(8)
HISTORY
The command line SafeEjectGPU tool first appeared in the 10.13.4 release of Mac OS X.
Mac OS X January 22, 2018 Mac OS X