Terminal command list?

Discussion in 'iPod touch' started by crimsondynamo329, Sep 2, 2008.

  1. crimsondynamo329

    crimsondynamo329 Member

    Joined:
    Jul 8, 2008
    Messages:
    493
    Likes Received:
    0
    Device:
    iPod touch
    Can anybody point me to or create a list of at least the basic terminal commands? I know they are really useful and I want to use them, but I don't even know what they are! Please help me

    Please Register or Log in to view images



    Also, I am wondering how you edit a file from the command line. I would like to edit (from Terminal) the MAC address changing script that runs at startup so I can change the address it sets it next time it boots. This is the script (StealthMAC):
    Code:
    #!/bin/bash
    # created by extremis 20080303
    
    macfile=/etc/stealthmac
    
    if [ -f ${macfile} ]; then
    	if grep -E '^([0-9A-Fa-f]{2}([:-]|$)){6}$' /etc/stealthmac >/dev/null; then
    		cat /etc/stealthmac | while read -r line; do
    			result=`echo ${line} | grep -E '^([0-9A-Fa-f]{2}([:-]|$)){6}$'`
    			if [ -z ${result} ]; then
    				echo ${line}
    				continue
    			else
    				echo "MAC: $result"
    
    				/usr/bin/ifconfig en0 up lladdr ${result}
    				break
    			fi
    		done
    	else
    		echo "Invalid MAC address specified in /etc/stealthmac"
    	fi
    else
    	echo "The config (${macfile}) does not exist"
    fi
    
    Or if this script could be used:
    Code:
    #!/bin/sh
    if [ $1 ] ; then
    ifconfig en0 lladdr $1
    else
    ifconfig|grep ether|cut -d" " -f2
    fi
    
    Thanks!

Share This Page