Tag Info

Hot answers tagged

10

There is no portable ps program. The ps command available on linux is, as others have mentioned, from the "procps" package. The reason why this cannot be ported to OSX is because Linux and OSX kernels do not expose this information in the same way. Linux uses a pseudo-filesystem in /proc, whereas OSX uses the sysctl function. Other systems may use either ...


10

The easiest way to do this is a program called "ImageSnap". You can take iSight photo's by typing the command imagesnap into terminal. All commands: USAGE: imagesnap [options] [filename] Version: 0.2.5 Captures an image from a video device and saves it in a file. If no device is specified, the system default will be used. If no filename is specfied, ...


6

No - since it does not exist. As to why there is no builtin ps in GNU’s coreutils package, see this answer on the Unix & Linux Forums. The best alternative formula available via Homebrew is psgrep: psgrep is a small Bash shell script that searches the process list (as obtained by ps(1) ) using the awesome utility grep(1) for its power. That ...


3

ps is not part of GNU coreutils according to Wikpedia. The version that comes with my Linux distribution seems to be from procps, but it seems like there is no formula for it in homebrew. There are formulas for pstree which can give you great tree views, and also htop is another good process viewer.


3

There are multiple ways to do this, here are 2. First method: Create a quick script that runs after a double-click. Create a text file, named myScript.command. The '.command' postfix will let Finder know to run it on opening. Add the following as plain text: #!/bin/bash killall -KILL Dock Now the script exists but needs to be executable. To do this you ...


2

This is simple job for AppleScript. First off make sure you're redirecting the standard output to a file by doing sudo security dump-keychain -d login.keychain > ~/Desktop/loginKeychain.txt. Before doing this command open up Script Editor, it should be in /Applications/Utilities/ then paste this: tell application "System Events" repeat while exists ...


2

There is Keychaindump tool written by Juuso Salonen which is a proof-of-concept tool for reading OS X keychain passwords as root. Basic usage: $ sudo ./keychaindump ~/Library/Keychains/login.keychain Example output: $ sudo ./keychaindump [*] Searching process 15 heap range 0x7fa809400000-0x7fa809500000 [*] Searching process 15 heap range ...


2

The following command line can be added to your script and it will refresh the Tab that has focus in the frontmost Safari window, (even if the frontmost window only has a single page loaded): osascript -e \ 'tell application "Safari" to set URL of current tab of front window to "file:///foo.html"'


1

The launchd job can be run manually so you can see the progress. Since locate runs find for you, that will also take forever, but perhaps you can inspect the progress or error condition the understand if the locate database is not getting built if you are patient: time sudo /usr/libexec/locate.updatedb While that runs, you could try spotlight as it ...


1

If you get a blank line from pandoc then something is quite amiss. My guess is you've got several `pandoc or the tex file is encoded oddly or throwing some error that the version I downloaded from dropbox isn't the same as the one you are using. $ pandoc test_dummy.tex -f markdown -t html | wc 311 1349 11676 $ pandoc test_dummy.tex -f markdown ...


1

Check out LiveReload. It is an app that watches your HTML files and can automatically for reload the pages in your browser. LiveReload can also do other things like automatically recompile SASS files to CSS and then reload the browser. In addition to the app at the link above, LiveReload is available on GitHub under a "Open Community Indie Software ...


1

There are multiple correct answers, here an answer let suits your train of thought. Run this oneliner: renice 10 -p $(ps -ax | grep -i [p]rocessname | awk 'NR==1{print $1}') What is does: renice 10, this will make your process run with the nicety of ten, the nicer, the higher the number. -p expects the process id ps -ax lists all running processes with ...


1

You can use pgrep instead of pidof on OS X. Using your example from earlier, the following should work: renice n -p $(pgrep <process name>) That said, a child started after the parent has had their priority changed should inherit the parent's priority.


1

So through JAMF, a very wise man showed me a very simple thing I needed to add to the end of my script: killall cfprefsd Solved the problem entirely. While if you go into System Preferences, it still shows the old screensaver being selected, it works.



Only top voted, non community-wiki answers of a minimum length are eligible