Saturday, June 25, 2011

Using patch and diff commands

Creating patches with diff

Using diff is simple when you are working with single files. To create a patch for a single .
diff -u file1.txt  new.txt  > new_file.patch

For  the directory, use following command:
diff -rupN  directory1/   directory2/   >  dir.patch

Apply  patch  

To apply a patch to a single file, change to the directory where the file is located and call patch:
patch  < dir.patch

you can specify the file on the command line:
patch  file.txt < dir.patch

To remove a patch, use the -R flag, 
patch -R file.txt < file.patch

Thursday, June 9, 2011

Network Manager Error : Device not managed (ubuntu)

I am facing the problem with Network Manager shows  error, with Wired and Wireless connection. When I click on  tetwork connection, It show "device not managed".

Problem Solve :

> First run command on terminal to see the connection status  sudo  lshw -C Network 
 This show ouput like :

sudo lshw -C network
[sudo] password for jagdeep: 
  *-network DISABLED               
       description: Wireless interface
       product: Centrino Wireless-N 1000
       vendor: Intel Corporation
       physical id: 0
       bus info: pci@0000:03:00.0
       logical name: wlan0
       version: 00
       serial: 8c:a9:82:5e:e4:e2
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless
       configuration: broadcast=yes driver=iwlagn driverversion=2.6.38-8-generic firmware= build 13488 ip= latency=0 link=yes multicast=yes wireless=IEEE 802.11bgn