Running Mac OS X in fullscreen in virtualbox

There are several options to do that, just Bing. But only one did the trick for me. Here it is. During the boot, hit enter and enter the following boot option:
“Graphics Mode”=”1600x900x32”
1600×900 is the resolution of my Dell laptop screen (Host machine). You can find more boot options here: http://www.insanelymac.com/forum/topic/99891-osx-flags-list-for-darwin-bootloader-kernel-level/

Disk usage and disk free space on unix

df -h //shows disk free space in mb, gb or bytes
df -k //shows size in kb

du -a /home | sort -n -r | head -n 10//gives the top 10 folders by size

using find, xargs, grep when the directory or file names contain space

The following command doens’t return any results :

command:
find . -name ‘struts*prop*’|xargs -t grep -si objectFactory
result:
grep -si objectFactory ./jive war/jive-5.0.2.1.war/WEB-INF/classes/struts.properties ./jive war/jive-sbs-employee-4.0.12.war/WEB-INF/classes/struts.properties

As you can see the directory name ‘jive war’ has a space. To overcome this limitation, use the following command:

command:
find . -name ‘struts*prop*’ -print0|xargs -t0 grep -si objectFactory
result:
grep -si objectFactory ./jive war/jive-5.0.2.1.war/WEB-INF/classes/struts.properties ./jive war/jive-sbs-employee-4.0.12.war/WEB-INF/classes/struts.properties
./jive war/jive-5.0.2.1.war/WEB-INF/classes/struts.properties:###       Alternatively, you can provide a com.opensymphony.xwork2.ObjectFactory subclass name here

Note the number zero in -print0 and -t0. That is a way to map end of line to a character in find and then tell xargs to ignore white space and tread character as end of string.

You can also use find with ‘-exec‘ option.

grep recursively, ignoring case, only in specific files like ‘.properites’ files

grep -ir –include ‘*.prop*’ ‘struts.objectfactory’  ~/Downloads/temp/

unix find command

To find files based on name, the syntax is

find [path…] -name filepattern

Examples:

find ~/Downloads/temp -name struts*xml

To use a regular expression:

find ~/Downloads/temp/ -regex .*jar.*/stru.*xml

Find other options here.

A strange thing I have noticed with the command “find ./ -name struts*” is that it only searches for files that match the name struts-tags.tld and ignore files like struts.xml. Later found out that the folder from where I am executing this search has only file that matches the format ‘struts*’, which is struts-tags.tld. So this looks like a feature of OSX to expand the struts* to struts-tags.tld. If there are more than one file that match the pattern, find will throw an error. So the correct way to search is to include the name in quotes as shown below:

find ~/Downloads/temp/ -name ‘sitemesh*’