Wednesday, August 12, 2009

Mac OS setfile utility

osxdaily.com:

Make a file or folder invisible in Mac OS X Finder

setfile -a V testfile.txt

Poof! Like magic, the file or folder is no longer visible via the Finder GUI, but don’t worry your files are still there and you can find them via the command line and will show with an ls command. If you want to make your files and folders visible again, use this command:

Make a file folder visible again in Mac OS X Finder

setfile -a v testfile.txt


+++++++++++++++++++++++++++++


/Developer/Tools/SetFile is a tool to set the file attributes on files in an HFS+ directory. It attempts to be similar to the setfile command in MPW. It can apply rules to more than one file with the options applying to all files listed.

Monday, August 10, 2009

Mac OS Print Screen

Apple key + Shift + 4
Utana ki lehet jelolni amirol kepet akarunk. Amint befejeztuk a kijelolest elkeszul egy png a desktop-ra.
Ha nem jelolunk ki, hanem leutjuk a space-t, akkor kamera lesz a kurzorbol es amelyik ablakra kattintunk arrol kapunk egy kepet a desktop-on.

Tovabba:

1: Create & Set a Designated Screen Shot Folder

Tired of screen shots cluttering the desktop? Me too, and the solution is simple: make a designated folder for screenshots to appear into and then set that as the new default screen shot location. I recommend making a subfolder in the ~/Pictures/ directory named “Screenshots”, then use the following defaults command to set that as the new save location for all screenshots:
defaults write com.apple.screencapture location ~/Pictures/Screenshots/
Follow that up with a restart of SystemUIServer for changes to take effect:
killall SystemUIServer
Test it out by taking a screen shot, it’ll now save directly to the Screenshots folder instead of the desktop.

2: Change the Screen Shot Image File Format

PNG files are typically large and bloated and not the most web-friendly, if your screenshots are destined for the web you can dramatically reduce the file size and avoid the hassle of batch converting images by just changing the default screen shot file type to another image format:
defaults write com.apple.screencapture type jpg
And again, restart SystemUIServer for JPG to be set as the new file type:
killall SystemUIServer
Take a screenshot to confirm. You can also choose GIF, TIF, PDF, or return back to PNG if you want the default setting again. Pick the appropriate format for your needs and this can prevent you from having to batch convert a huge group of images after they’ve been taken.

3: Take Impossible Screen Shots with a Timer

Launch the Grab app found in /Applications/Utilities/ and you can take screen captures on a timer, letting you screenshot things that would otherwise be impossible, like some menu pulldowns, system events, and splash screens.
  • From Grab, pull down the “Capture” menu and choose “Timed Screen”
The default Grab setting is 10 seconds, if you need to have a different time delay, use Terminal instead:
screencapture -T 3 osxdaily.jpg
Replace “3″ with how ever many seconds you want the timed delay to be.

4: Capture the Mouse Pointer or a Custom Cursor in Screen Captures

The aforementioned Grab app has a handy feature that lets you show the pointer in screenshots, and it’s actually customizable from a variety of pointer types. Here’s how to use it:
  • In the Grab app, open “Preferences” and select the desired cursor type”
  • Take a screen shot using Grab app to capture the mouse cursor
Show the cursor in screen shots

5: Move the Selection Area from the Original Position

Command+Shift+4 allows you to take a screenshot with a selection box, but have you ever wanted to move it around after you’ve drawn that selection box? You can.
  • Hit Command+Shift+4 to draw the screen shot selection box as usual, then hit and hold Spacebar and click to drag the box
Screen shot selection box
I’d never actually heard of this one before, but CultOfMac found this neat trick, cheers to them!