Monday, July 8, 2013

how to find active ip address (host) list on local network

1. arp-scan --interface=eth0 192.168.0.0/24
2. arp -a
3. nmap -sP 192.168.1.0/24
4. ping the broadcast : $ ping 192.168.182.255 , You will get a response with the IP address of any device on the network capable of responding to pings.

how to add color to terminal in mac

create a .bash_profile file :

$ nano .bash_profile
add these lines  (dark bg) :

export CLICOLOR=1
export LSCOLORS=GxFxCxDxBxegedabagaced
or (bright bg) :

export CLICOLOR=1
export LSCOLORS=ExFxBxDxCxegedabagacad

Sunday, July 7, 2013

how to create a zip file with password

zip -e   [zip_file/target]   [source_file]

example :

zip -e test.zip myimage.tga
zip -e movie.zip myfilm.mov

Tuesday, June 11, 2013

manually install vmware tool in mac (vmware fusion)

Sometime when we try to istall the vmware tool from the menu, nothing will happen. So we need to do manual install.

From the Host (MAC), go to Application/vmware. Right click and select 'show package contents'. Navigate to Content/Library/isoimages. Grab the .iso (windows.iso or linux.iso depends on which guest OS we're trying to use) and make a copy to the for example : desktop.

From the guest OS, connect CD, and mount that ISO and windows will detect the CD and then find and run the installer from inside the CD.

Cheers.

create shutdown shortcut in windows

Desktop - right click - new - shortcut ... then 

type : 

shutdown.exe -s (shutdown) 

or 

shutdown.exe -r (restart)

:-)

Friday, June 7, 2013

capture using isight in mac from command line

download imagesnap app

imagesnap <output>

ex : imagesnap test.jpg

preview an image file using command line in mac

qlmanage

qlmanage -p (preview)

qlmanage -t (thumbnail)

how to install .bin file in linux ?

chmod a+x name_of_file.bin
Then run it by writing
sudo ./name_of_file.bin

How to find Linux kernel 32 or 64 and CPU 32 or 64 ?

To check Kernel
uname -m
x86_64 ==> 64-bit kernel
i686   ==> 32-bit kernel
or more detail info by : 
unamme -a

To check CPU
cat /proc/cpuinfo
or:
grep flags /proc/cpuinfo
Under "flags" parameter, you will see various values. Among them, one is named "tm(transparent mode)" or "rm(real mode)" or "lm(long mode)"
rm ==> 16-bit processor
tm ==> 32-bit processor
lm ==> 64-bit processor
Note: you can have a 64-bit CPU with a 32-bit kernel installed

Wednesday, June 5, 2013

open app in mac using commandl line

Open app : open /Applications/Mail.app

Close app : killall Mail

how to enable root user in macos x

in snow leopard os 10.6.x :
- Go to System preferences
- Go to Accounts and unlock it
- Login options
- Join
- Open directory utility and unlock it
- from Edit menu, select 'enable root user '

using command line :
dsenableroot : to enable root
dsenableroot -d : to disable root

Monday, June 3, 2013

install wget on macosx

2tar xvzf wget-1.14.tar.gz
3cd wget-1.14
4./configure --with-ssl=openssl
5make
6sudo make install