Linux

Ignoring whitespace changes with svn diff

svn diff --diff-cmd `which diff` -x "-w"

Find any regular files with the criteria -type f, and those modified seven or fewer days ago (-mtime -7).

find / -type f -mtime -7 | xargs tar -rf *.tar

لینوکس شریف سیستم عاملی ایرانی

find . -exec grep -l ‘foobar’ {} \; 2>/dev/null
find $root -name $filename -exec grep -l ‘something’  {} \; 2>/dev/null

Enable WPA Wireless in Ubuntu

Update the source list run the following command
$ sudo apt-get
$ sudo apt-get install wpasupplicant
$ sudo apt-get install network-manager-gnome network-manager

Comment out everything other than “lo” entries in that file and save the file
$ sudo vi /etc/network/interfaces

Create a file called /etc/default/wpasupplicant, add entry ENABLED=0 and save the file
$ sudo touch /etc/default/wpasupplicant

Reboot the system or use the following command
$ sudo /etc/init.d/dbus restart

Tips & Trick

autoupdate: sudo aptitude autoclean
format a new partition as ext3 file system:  sudo mkfs -t ext3 /dev/sdb1
create a new mount point: sudo mkdir /media/mydrive

One Response to “Linux”

  1. cina, 22. December 2010, 14:04

    FIND and GREP Combination.
    Using find and grep together:

    find ./* -exec grep -l -i “site Overview” {} \;

Post your comment

Captcha
Enter the letters you see above.