"Opensnoop" command helps in file system monitoring activities ex if we want to know what all files are accessed by an application or which all processes access a particular file then opensnoop will help you in that activity.
Let us say if we want to know what all files are accessed by firefox in its operation time on mac os x then run opensnoop in sudo or root mode as below
sudo opensnoop -n firefox
Note : We can even supply the process id (PID) of an application in place of the application name above by using the -p switch as "sudo opensnoop -p "
Ex 2 :
Let us say if we want to know what all process/applications are accessing a particular file then run the opensnoop command as
The Mac OS X provides a command line music player if you do not want to use iTunes or any other music player, which is very easy to use. Just supply the music file (such as mp3,wma , etc) located in a directory "afplay" command as below.
afplay -h will give you all the other options available with the command.
We might some time require to disable the spotlight(search indexing) for some time in mac os x operating system. This can be done as below sudo mdiutil -a -i off The above command will stop indexing on all the volumes mounted in mac os x. To enable back again, run sudo mdiutil -a -i on
Auslogics Disk Defrag : A very useful utility to schedule and organize disk de-fragmentation in windows . The software provides multiple preferences or settings to schedule or organize the regular or much needed disk de-fragmentation on windows operated disks. The tool is freeware for home users and can be downloaded from here
We often see the disk drives such as USB's / Harddisk partitions do not get opened in windows when we double click on the disk icon in explorer after machine is infected with autorun.inf virus. This is due to hidden autorun.inf presence in the root directory of the drive ex: C:\autorun.inf or I:\autorun.inf where I:\ refers to a USB disk. The below said steps will help you in fixing this problem very easily
Scan and Clean the drives with a good antivirus and make sure all the disks are free from virus.Now open Command Prompt (i.e. cmd.exe) by typing cmd, in Run ( To open it go to Start -> Run, enter cmd and press enterGoto USB disk drive such as F: in your command promptNow run the command DIR /w /a to see all hidden files and folders.Now run the command attrib to remove all special attributes associated with files and folders as attrib -R -S -H /S /D *.*Now delete the autorun.inf with command del autorun.infRemove your usb disk and plug it againNow you can open the drive by d…
When Mac goes to sleep mode (i.e, when we close the lid of the laptop, or power saving kicks in, etc.) it saves a hibernate file (/var/vm/sleepimage) first, and then goes to standy mode (thus the computer is on, it just stops running all programs and puts itself into a low powered mode). If you want your mac always to go to hibernate mode then execute the below commands with sudo privileges
sudo pmset -a hibernatemode 1 (This effects when your mac is in all modes such as battery and UPS and AC)
sudo pmset -b hibernatemode 1 (This effects only when your mac is on battery mode)
Thats it! Now put the machine to sleep or just close the lid of your mac to put your mac directly to hibenate.
If you want to reset back to default settings use following commands