Friday, March 22, 2019

Git revert commands

# It also takes ranges. This will revert the last two commits:
git revert HEAD~2..HEAD
# It also takes ranges. This will revert the last three commits:
git revert HEAD~3..HEAD
git revert --no-commit 0766c053..HEAD
git commit
This will revert everything from the HEAD back to the commit hash 0766c053

HEAD means the current version. 

More from this link: https://stackoverflow.com/questions/4114095/how-to-revert-a-git-repository-to-a-previous-commit





Monday, March 14, 2016

美国韦恩州立大学招收计算机安全全奖博士

美国韦恩州立大学(Wayne State University)计算机系张锋巍(Fengwei Zhang)老师招收计算机安全方向的全奖博士生(RA/TA),2016年秋季入学。张老师参与了美国自然科学基金(NSF)和军方(DARPA, IAPRA, DHS)的科研项目,他的研究成果发表在计算机安全领域的顶级会议期刊上面,其中包括S&P, NDSS, DSN, ACSAC, 和TDSC。对计算机安全有热情的同学,请邮件联系他 fengwei[_]wayne.edu, 以及他的网站是 http://www.cs.wayne.edu/fengwei
欢迎本科生,硕士生,以及工作的同学都申请。对 TOFEL 和 GRE 分数没有硬性要求;但希望申请的同学有较强的动手能力,计算机系统知识扎实,对计算机安全研究有热情。张老师的实验室同时也招收博士后,访问学者,联合培养生,同时也十分欢迎计算机安全领域的老师来交流访问。

韦恩州立大学位于美国底特律市,是美国的公立研究型大学;它由13所学院和超过32,000名研究生和本科生的学院,提供超过400个主要学科领域。韦恩州立大学是美国30家规模最大的大学之一。校园非常安全,城市生活十分便利(有直飞北京上海的航班和大型中国超市)。韦恩州立大学计算机系统方面有五个 NSF CAREER 获得者,经常在顶级会议上面有论文发表,毕业的学生有去学校做老师,比如 William& Mary, Delaware 等,在读博士的同学们夏天也很受业界大公司们的青睐去科研实习,比如 Google,IBM Research,Facebook,Intel 等。 

关于韦恩大学的排名,不同的排名机构不一样,请大家参考百度百科和维基百科。下面是最新的美国大学学术表现排名,仅供大家参考。(The University Ranking by Academic Performance (URAP) 2015-2016): Wayne State University as 67th in the United States and 225th worldwide. 美国排名:67;全球排名:225。

排名规则:http://www.urapcenter.org/2015/index.php#
美国排名:http://www.urapcenter.org/2015/country.php?ccode=US&rank=all
全球排名:http://www.urapcenter.org/2015/world.php?q=MS0yNTA=
新闻报道: http://today.wayne.edu/featured-stories/22743?utm_source=link&utm_medium=email-56f9366f8b61a&utm_campaign=Today%40Wayne+-+Monday%2C+March+28%2C+2016&utm_content=















Thursday, February 4, 2016

Android Emulator requires 64 bit System

Error messages :


http://askubuntu.com/questions/534044/error-32-bit-linux-android-emulator-binaries-are-deprecated-when-attemping-to-r

You can download 64 bit Kali Linux from here:
https://www.kali.org/downloads/

Wednesday, February 3, 2016

Resize Disk in for VM images (Kali Linux as a Guest OS)

1. In VMware settings, change the disk size

2. Boot the VM image with the installation Disk ISO. You can choose the startup device in the VMware settings. 

3. Open the GParted application. 

4. Since the added space is at the end, you need to delete the swap Linux patitaion first, then you can expand your /dev/sda1. 

Details see: http://askubuntu.com/questions/51272/how-do-i-repartition-with-gparted

  1. In the machine's settings point the CD Drive to the .iso file with your Ubuntu LiveCD. You may also need to make sure the "Connect at power on" check box is checked.
  2. Power the virtual machine on and hit F2 with the focus inside the machine.
  3. Once inside the BIOS move to the Boot tab and select CD-Rom as primary boot device.
  4. Run gParted - I think it's always there.
  5. Destroy the swap partition: swapoff, delete the extended and linux-swap partitions.
  6. Resize your primary partition to desired size.
  7. Allocate your swap back again to whatever you like - create an extended partition and then allocate as linux swap. Remember about swapon :)
And that's it. You now have a big primary partition!
In my case you'd need to have Jedi reflexes to get into BIOS by pressing F2 on the splash screen - the boot delay is just too short. What you can do to slow it down is go to your vm's .vmx file and type in something reasonable like:


Other useful link: http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1020778

Monday, February 1, 2016

Buffer Overflow

http://stackoverflow.com/questions/17775186/buffer-overflow-works-in-gdb-but-not-without-it

./BOF
and
./root/file/BOF
are different.


Wednesday, January 27, 2016

"I moved it" v.s. "I copied it"

http://www.experts-exchange.com/articles/12515/HOW-TO-Select-the-right-answer-to-I-Moved-It-or-I-Copied-It-in-VMware-vSphere-ESXi.html

I Moved It - should be used only, when you are manually moving a virtual machine between datastores, which includes moving to a new host and different datastore.

I Copied It - should be used when you want to COPY or CLONE a virtual machine, and used on the network at the same time as the original virtual machine.

Now that you have read, and hopefully understand the difference between "I Moved It" or "I Copied It" selections, I'll answer the question raised at the beginning

I've selected Copied, and now all My IP addresses have changed! Why?

As we've seen above, selecting "I Copied It" changes the uuid.bios and uuid.location values, which will force and generate a new MAC address. If you have been using DHCP (Dynamic Host Configuration Protocol) to supply IP Addresses to your computers on your LAN, your virtual machine will receive a new IP Address, after this change.

I hope this article helps you to understand the difference between "I Moved It" or "I Copied It" when you have moved or copied a virtual machine.

Friday, January 8, 2016

Compress on Mac using Terminal

If we right click the folder and then compress. The .zip may not be able to work across platforms (e.g., open it on Windows). We can use the terminal to compress files or folders.

http://coolestguidesontheplanet.com/how-to-compress-and-uncompress-files-and-folders-in-os-x-lion-10-7-using-terminal/

ZIP – Cross Platform

First up is ZIP one of the most commonly used compression techniques used across all platforms
To compress
zip -r archive_name.zip folder_to_compress
To extract
unzip archive_name.zip
If you want to make a zip without those invisible Mac resource files such as “_MACOSX” or “._Filename” and .ds store files, use the “-X” option in the command so:
zip -r -X archive_name.zip folder_to_compress

TAR.GZ – Cross Platform

Second up is TAR, an old favourite on Unix/Linux – you add the GZ for the compression – compresses tighter than zip
To compress
tar -zcvf archive_name.tar.gz folder_to_compress
To extract
tar -zxvf archive_name.tar.gz

TAR.BZ2 – Cross Platform

A variation on TAR GZ but with better compression than both tar.gz and zip.
To compress
tar -jcvf archive_name.tar.bz2 folder_to_compress
To extract
tar -jxvf archive_name.tar.bz2

GZ

Without the tar
To extract


gunzip archivename.gz

Thursday, January 7, 2016

Turn off ASLR

http://askubuntu.com/questions/318315/how-can-i-temporarily-disable-aslr-address-space-layout-randomization

According to an article How Effective is ASLR on Linux Systems?, you can configure ASLR in Linux using the /proc/sys/kernel/randomize_va_space interface.
The following values are supported:
  • 0 – No randomization. Everything is static.
  • 1 – Conservative randomization. Shared libraries, stack, mmap(), VDSO and heap are randomized.
  • 2 – Full randomization. In addition to elements listed in the previous point, memory managed through brk() is also randomized.
So, to disable it, run
echo 0 | sudo tee /proc/sys/kernel/randomize_va_space
and to enable it again, run
echo 2 | sudo tee /proc/sys/kernel/randomize_va_space
This won't survive a reboot, so you'll have to configure this in sysctl. Add a file /etc/sysctl.d/01-disable-aslr.conf containing:
kernel.randomize_va_space = 0
should permanently disable this.

http://www.2cto.com/os/201212/178306.html

If you use VIM or VI to change the value, it will have following error message:

 "/proc/sys/kernel/randomize_va_space" E667: Fsync failed
 Press ENTER or type command to continue

 Why:U cannot edit the  /proc files with  vi  . if u want 
 to change its value u can  echo to that file  like 
 echo "20000000" >   /proc/sys/kernel
======================================
 # echo 0 >/proc/sys/kernel/randomize_va_space 
 # more /proc/sys/kernel/randomize_va_space 
 0
=====================================

Wednesday, December 23, 2015

Move SVN repository from one server to anther

http://www.petefreitag.com/item/665.cfm

Step 1: Backup your old Repository
The first thing you need when moving from one server to another is a dump of your subversion repository. Hopefully you are already creating dump's with a backup script, but if not here's how you can create a subversion dump file:

svnadmin dump /path/to/repository > repo_name.svn_dump

The dump file contains all the revisions you have ever made to your svn repository, so it will probably be quite large (it even includes files you may have deleted in a previous revision).

Step 2: Create the new Repository Now, simply transfer the dump file on to your new subversion server, and create an empty repository:

svnadmin create /path/to/repository

Step 3: Import your old repository into the new one Next import your dump file:

svnadmin load /path/to/repository < repo_name.svn_dump

You may want to force subversion to use the same UUID for the new repository as the old repository. To do this add --force-uuid to your svnadmin load command. In my case I wanted to do this. If you have already loaded your repository, there is a way to set the UUID at a later date, check the docs. That's it, you now have a replica of your old repository on your new server.


HOW TO RELOCATE YOUR LOCAL COPY:
$ svn switch --relocate svn+ssh://username1@server1/home/username1/repos/file svn+ssh://username2@server2/home/username2/repos/file

Friday, June 19, 2015

What is the booting process for x86 machines

http://www.dewassoc.com/kbase/hard_drives/master_boot_record.htm

Thursday, January 22, 2015

Install latex on Mac Part 2

Do not install latex using
sudo port install texlive-latex-extra
sudo port install texlive +full

Download MacTex.pkg and install it.

But download it from here: http://www.ctan.org/tex-archive/systems/mac/mactex/
Not here: http://www.tug.org/mactex/
Because it is fast for the first link.


After install it, the pdflatex is installed under /usr/texbin/pdflatex

While the port install the latex under /opt/local/bin/pdflatex
libararies /opt/local/share/texmf-texlive/

If we install both, just delete the pdflatex command from /opt/local/bin, then the system will use the pdflatex under /usr/textbin/


Wednesday, December 3, 2014

How does Cache work

1. instruction cache
2. data cache: L1, L2, L3
3. TLB

Data cache:
http://en.wikipedia.org/wiki/CPU_cache

Example:
The original Pentium 4 processor had a four-way set associative L1 data cache of 8 KB in size, with 64-byte cache blocks. Hence, there are 8 KB / 64 = 128 cache blocks. The number of sets is equal to the number of cache blocks divided by the number of ways of associativity, what leads to 128 / 4 = 32 sets, and hence 25 = 32 different indices. There are 26 = 64 possible offsets. Since the CPU address is 32 bits wide, this implies 21 + 5 + 6 = 32, and hence 21 bits for the tag field.
The original Pentium 4 processor also had an eight-way set associative L2 integrated cache 256 KB in size, with 128-byte cache blocks. This implies 17 + 8 + 7 = 32, and hence 17 bits for the tag field.[3]

Wednesday, November 19, 2014

Reading the EFI chip from MacBook Pro

I have a MacBook Pro 2009, and its Model No. is A1286.  Next, I will explain how to read the EFI chip externally.

Step 1)

Turn off the laptop; open the back case; and remove its battery (This is important because we use the external power and don't want to have any internal power source).




Step 2)

Locate the EFI chip on the motherboard. It is a Small Outline Integrated Circuit (SOIC) with 8 pins. The EFI chip on my laptop is a SST25VF032B-50-4C-S2AF - 32 Mbit SPI Serial Flash.




Step 3)

Just simply Google the name of the chip, you will find its datasheet.
http://www.datasheet.hk/view_download.php?id=1281512&file=0111\sst25vf032b_1179241.pdf
http://www.datasheet.hk/view_download.php?id=1914926&file=0458\sst25vf032b-80-4i-s2af_6370277.pdf
Understand the pins of the SOIC.


Step 4)

Get a 8 pin clip, a BusPirate, a mini-B USB cable, and a number of probes



Step 5)

Figure out how the BusPirate connects to the clip and SOIC: which pin connects to which one.

Pin layout of the BusPrirate
http://dangerousprototypes.com/docs/Bus_Pirate_I/O_Pin_Descriptions

Also, I think this is a nice figure to connect a 8 pin SOIC with the BusPirate. I believe all of the 8 pin SOIC has the same pin layout.


Note that WF# (write protect), HOLD# (hold), and VDD (power supply) connects to +3.3v line.

Step 6)

Connects the SOIC chip with the clip; connects the Buspirate to another machine. I used a Dell laptop with Ubuntu 14.04 LTS installed.




Step 7)

Read the EFI chip. There are two ways to read the flash. First, we can can use a serial console to manual read the chip. Second, we can use tool like flashrom to read it if flashrom supports it.

Method 1:
Install minicom to read the serial console. Configure the minicom by run $ minicom -s. You can add $sudo to save the setup as default. Also, don't configure F - Hardware Flow Control.



Press the Enter key, you should get a shell prompt. Next, configure the BusPirate to read SPI.

HiZ>?
-- show help
HiZ>m
-- change mode
HiZ>5
-- select SPI as the mode
HiZ>5
-- set speed as 1MHz
HiZ>[Enter]
-- set clock polarity as Idle low, which is default
HiZ>[Enter]
-- set output clock edge as Active to idle, which is default
HiZ>[Enter]
-- set Input sample phase as Middle, which is default
HiZ>[Enter]
-- set CS as /CS, which is default
HiZ>2
-- select output type as Normal (H=3.3v, L=GND)

SPI is read to use.

Method 2:
Go to flashrom website: http://flashrom.org/Supported_hardware
Search your chip to see if it is supported. For example, the EFI chip, SST25VF032B, on my MacBook Pro is supported.
Install flashrom, use it to read the EFI chip.

$ ./flashrom -p buspiratespi:dev=/dev/ttyUSB0,spispeed=1M -r efi.rom

This command specify to use the BubPirate as the programmer to read the EFI chip. Try this command multiple times because the USB cable may not have enough power to read it. Also, try to change the SPI speed to 256K or other values. See the man page of flashrom for more details.

If the reading is not successful, you may want to use the minicom to configure the buspirate first, then use the flashrom to read it.










Wednesday, October 15, 2014

error: C compiler cannot create executables in buildozer

Run this command:
cp -r ~/.buildozer/android/platform/android-ndk-r9d/platforms/android-19 ~/.buildozer/android/platform/android-ndk-r9d/platforms/android-20

From here: https://groups.google.com/forum/#!msg/kivy-dev/iyPOwoN9wHY/dajh0kfUClcJ

Error message: 


Run prebuild
Call prebuild_hostpython
Call prebuild_python
Call prebuild_sdl
Call prebuild_zope
Call prebuild_pygame
Call prebuild_pyjnius
Call prebuild_twisted
missing header for unified diff at line 3 of patch
patching file twisted/python/compat.py
Call prebuild_android
Call prebuild_kivy
Run build
Skipped build_hostpython
Call build_python
Entering in ARM environment
Compiler found at /Users/fengwei/.buildozer/android/platform/android-ndk-r9d/toolchains/arm-linux-androideabi-4.8/prebuilt/darwin-x86_64/bin//arm-linux-androideabi-gcc
configure: WARNING: if you wanted to set the --build type, don't use --host.
    If a cross compiler is detected then cross compile mode will be used
checking for --enable-universalsdk... no
checking for --with-universal-archs... 32-bit
checking MACHDEP... darwin
checking EXTRAPLATDIR... $(PLATMACDIRS)
checking machine type as reported by uname -m... x86_64
checking for --without-gcc... no
checking for arm-eabi-gcc... arm-linux-androideabi-gcc -DANDROID -mandroid  -fomit-frame-pointer --sysroot /Users/fengwei/.buildozer/android/platform/android-ndk-r9d/platforms/android-20/arch-arm
checking whether the C compiler works... no
configure: error: in `/Users/fengwei/Documents/paper/icas/trunk/code/ICAS-AndroidNetclientTester/src/.buildozer/android/platform/python-for-android/build/python/Python-2.7.2':
configure: error: C compiler cannot create executables
See `config.log' for more details

# Command failed: ./distribute.sh -m "kivy twisted" -d "chordclient"

Tuesday, October 14, 2014

Makefile: how it woks

http://www.jfranken.de/homepages/johannes/vortraege/make_inhalt.en.html


Thursday, October 9, 2014

Access the redirection table entry in IO APIC

http://wiki.osdev.org/IOAPIC
http://wiki.osdev.org/APIC

These two URLs provides detailed the explanation about IOAPIC, but the read/write code do not work on my CentOS machine. The IO APIC base is 0xfec00000 on my machine (index 0xfec00000; port 0xfec00010). It is a memory maped IO memory.

I use the code in both user-level program and a kernel module. The code raises an segmentation fault. After looking at the dmesg, I notice that it is because page table does not know how to translate the virtual address (i.e., 0xfec00000).

Then I use the ioremap() in the kernel module, it works.

#include <linux/module.h>
#include <linux/init.h>

#include <asm/io.h>


MODULE_LICENSE("Dual BSD/GPL");



static int hello_init(void)
{
    // IO APIC base is 0xfec00000
    // IO APIC index: 0xfec00000
    // IO APIC data: 0xfec00010
    // The redicection table of the keyboard is at index 0x12
    // please see southbridge manual for redirection table
    // the original value of the redirection table entry is 0x939
    // We change it to 0xa39, which enables SMI triggering
    //
    // if you want to compile this kernel moudule,
    // please also change the Makefile to hello6.o
    //
    // just run the script enable_kb_SMI.sh to enable the SMI
    // triggering
    //
    unsigned int IRQ1_entry;
    void * IOAPIC_BASE = ioremap(0xfec00000, 32);
    iowrite8(0x12, IOAPIC_BASE);
    IRQ1_entry = ioread32((unsigned char*)IOAPIC_BASE + 0x10);
    printk("IRQ1 Entry Value is: %x\n", IRQ1_entry);
     
    iowrite8(0x12, IOAPIC_BASE);
    iowrite32(0xA39, (unsigned char*)IOAPIC_BASE + 0x10);
  
    printk("Successfully enable keyboard SMI triggering\n");
    return 0;
}

static void hello_exit(void)
{
    printk("Goodbye, crule world\n");
}

module_init(hello_init);
module_exit(hello_exit);

Monday, October 6, 2014

Create OpenVZ Cotainers

1. Download the template

echo 'Now downloading CentOS6 x86_64 template....'
cd /vz/template/cache
wget http://download.openvz.org/template/precreated/centos-6-x86_64.tar.gz


2. $vzctl create 101 centos-6-x86_64

It uses the default conf from /etc/vz/conf

Templates:
http://wiki.openvz.org/Download/template/precreated


Install OpenVZ on Amazon EC2 Instance

1. Create an CentOS 6 Amazon Instance from the MarketPlace. 

Click on launch instance, then click on AWS marketpalce
I choose:
Rating
Sold by CentOS.org
$0.00/hr for software


2. Download this script into instance and run it. 

https://raw.githubusercontent.com/H2so4/CentOS-6-Quick-Install-Scripts/master/installOpenVZ-with-WebPanel.sh

#!/bin/bash
# run: source <(curl -s https://raw.github.com/qrpike/CentOS6---OpenVZ-Installer/master/installOpenVZ.sh)


clear
echo 'Going to install OpenVZ for you..'

echo 'installing wget..'
yum install -y wget

echo 'now adding openvz Repo'
cd /etc/yum.repos.d
wget -P /etc/yum.repos.d/ http://ftp.openvz.org/openvz.repo
rpm --import http://ftp.openvz.org/RPM-GPG-Key-OpenVZ

echo 'Installing OpenVZ Kernel'
yum install -y vzkernel.x86_64

echo 'Installing additional tools'
yum install -y vzctl vzquota

echo 'Changing around some config files..'
sed -i 's/kernel.sysrq = 0/kernel.sysrq = 1/g' /etc/sysctl.conf
sed -i 's/net.ipv4.ip_forward = 0/net.ipv4.ip_forward = 1/g' /etc/sysctl.conf

echo 'net.ipv4.conf.default.proxy_arp = 0' >> /etc/sysctl.conf
echo 'net.ipv4.conf.all.rp_filter = 1' >> /etc/sysctl.conf
echo 'net.ipv4.conf.default.send_redirects = 1' >> /etc/sysctl.conf
echo 'net.ipv4.conf.all.send_redirects = 0' >> /etc/sysctl.conf
echo 'net.ipv4.icmp_echo_ignore_broadcasts=1' >> /etc/sysctl.conf
echo 'net.ipv4.conf.default.forwarding=1' >> /etc/sysctl.conf

echo 'Done with that, purging your sys configs'
sysctl -p

sed -i 's/NEIGHBOUR_DEVS=detect/NEIGHBOUR_DEVS=all/g' /etc/vz/vz.conf
sed -i 's/SELINUX=enabled/SELINUX=disabled/g' /etc/sysconfig/selinux

echo 'Now downloading CentOS6 x86_64 template....'
cd /vz/template/cache
wget http://download.openvz.org/template/precreated/centos-6-x86_64.tar.gz

/bin/cp /etc/rc.local /tmp/rc.local
cat > /etc/rc.local << EOF
#!/bin/bash
wget -O - http://ovz-web-panel.googlecode.com/svn/installer/ai.sh | sh 
modprobe vzcpt
modprobe nf_conntrack_ftp
modprobe ip_nat_ftp
/bin/cp -f /tmp/rc.local /etc/rc.local
EOF

# BARE MINIMUM OpenVZ iptables config - CENTOS 6.4
cat > /etc/sysconfig/iptables << EOF
*nat
:PREROUTING ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
:POSTROUTING ACCEPT [0:0]
-A POSTROUTING -o eth+ -j MASQUERADE
COMMIT
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
-A INPUT -p icmp -m icmp --icmp-type echo-request -j REJECT --reject-with icmp-host-prohibited
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 443 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 3000 -j ACCEPT
-A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT
-A FORWARD -p icmp -m icmp --icmp-type echo-request -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -p icmp -j ACCEPT
-A FORWARD -i lo -j ACCEPT
-A FORWARD -o eth+ -j ACCEPT
-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -j REJECT --reject-with icmp-host-prohibited
COMMIT
EOF
reboot


echo ' - - - - - - - - - - - - - - - - - - - - - - '
echo ' The server will reboot now and install OpenVZ Web panel'
echo ' '
echo 'When the server boots, it will run the OpenVZ Web panel installation which can take up to 10 minutes'
echo 'This script is executed by backing up/replacing /etc/rc.local with a new file containing the installation script.'
echo 'Once complete, the original /etc/rc.local file is replaced'
echo ' - - - - - - - - - - - - - - - - - - - - - - '

echo '..... well.... that should do it.'
echo 'oh, and ur welcome...'

More info
http://scaleup.us/2014/01/01/centos-one-liner-installation-openvz-and-openvz-web-panel/




Wednesday, October 1, 2014

BASH related

Because of the serious bug, BashShock, released recently, I played with bash a little bit. Here are some notes:

/bin/sh
/bin/bash
/usr/local/bin/bash

/bin/sh is the shell, and you can the shell scirpts are starting with #!/bin/sh.
Most of the default shell is bash. You can change the default shell using $chsh command

If you install the bash from source code, the bash maybe installed under /usr/local/bin directory.
After you installation, if you type $which bash, it should show /usr/local/bin/bash.

What if you want to change the bash back to /bin/bash:
You can do $ export PATH=/bin/:$PATH. This command will put the /bin/ in the beginning of the PAHT. If you type $which bash, it should show /bin/bash. This is because the searching is from the beginning of the $PATH.

Tuesday, September 30, 2014

set ulimit on Mac

http://unix.stackexchange.com/questions/108174/how-to-persist-ulimit-settings-in-osx-mavericks