Error message

  • Warning: Illegal string offset 'field' in DatabaseCondition->__clone() (line 1901 of /home1/rholroyd/drupal/drupal-7.12/includes/database/query.inc).
  • Warning: Illegal string offset 'field' in DatabaseCondition->__clone() (line 1901 of /home1/rholroyd/drupal/drupal-7.12/includes/database/query.inc).
  • Warning: Illegal string offset 'field' in DatabaseCondition->__clone() (line 1901 of /home1/rholroyd/drupal/drupal-7.12/includes/database/query.inc).
  • Warning: Illegal string offset 'field' in DatabaseCondition->__clone() (line 1901 of /home1/rholroyd/drupal/drupal-7.12/includes/database/query.inc).
  • Warning: Illegal string offset 'field' in DatabaseCondition->__clone() (line 1901 of /home1/rholroyd/drupal/drupal-7.12/includes/database/query.inc).
  • Warning: Illegal string offset 'field' in DatabaseCondition->__clone() (line 1901 of /home1/rholroyd/drupal/drupal-7.12/includes/database/query.inc).
  • Warning: Illegal string offset 'field' in DatabaseCondition->__clone() (line 1901 of /home1/rholroyd/drupal/drupal-7.12/includes/database/query.inc).
  • Warning: Illegal string offset 'field' in DatabaseCondition->__clone() (line 1901 of /home1/rholroyd/drupal/drupal-7.12/includes/database/query.inc).
  • Warning: Illegal string offset 'field' in DatabaseCondition->__clone() (line 1901 of /home1/rholroyd/drupal/drupal-7.12/includes/database/query.inc).
  • Warning: Illegal string offset 'field' in DatabaseCondition->__clone() (line 1901 of /home1/rholroyd/drupal/drupal-7.12/includes/database/query.inc).
  • Warning: Illegal string offset 'field' in DatabaseCondition->__clone() (line 1901 of /home1/rholroyd/drupal/drupal-7.12/includes/database/query.inc).
  • Warning: Illegal string offset 'field' in DatabaseCondition->__clone() (line 1901 of /home1/rholroyd/drupal/drupal-7.12/includes/database/query.inc).
  • Warning: Illegal string offset 'field' in DatabaseCondition->__clone() (line 1901 of /home1/rholroyd/drupal/drupal-7.12/includes/database/query.inc).
  • Warning: Illegal string offset 'field' in DatabaseCondition->__clone() (line 1901 of /home1/rholroyd/drupal/drupal-7.12/includes/database/query.inc).

linux

Verifying delimited file formats the easy way

During the last week I've been having to validate (pipe) delimited files with many millions of lines of data before passing them off for import to another system. Some of that data was user generated and unfortunately played havoc with the file format.

So, if you have an agreed format of for a delimited file you can very quickly check that you have the expected column count on each line with (g)awk like this:

[geshifilter-pre] $ awk 'BEGIN { FS = "|" } ; { if( NF-1 != 7 ) print NR ":" NF-1 }' myfile.dat [/geshifilter-pre]

Checking which version of Ubuntu Server is installed

You can find out which version of Ubuntu you currently have installed with the following command:

[geshifilter-pre class="brush:bash;"] $ lsb_release -a[/geshifilter-pre]

 

Finding large files from the command line

To find the largest files using the command line, you could use the following:  

[geshifilter-pre class="brush:bash;"] $ du -a | sort -rn | head[/geshifilter-pre]

 

Finding the UUID of a device in Ubuntu

To find the UUID of a device in Ubuntu Server do the following:

[geshifilter-pre class="brush:bash;"] $ ls -lh /dev/disk/by-uuid/[/geshifilter-pre]

 

Subscribe to RSS - linux