The Blog

Author: admin

Archive files and folders in Linux

Posted on

ASSERT: No files have newline characters in them. Spaces, however, are AOK.

# TEST FIRST: CREATION OF FOLDERS
find . -type f -iname \*.mov -printf ‘%h\n’ | sort | uniq | xargs -n 1 -d ‘\n’ -I ‘{}’ echo mkdir -vp “/TARGET_FOLDER_ROOT/{}”

# EXECUTE CREATION OF EMPTY TARGET FOLDERS
find . -type f -iname \*.mov -printf ‘%h\n’ | sort | uniq | xargs -n 1 -d ‘\n’ -I ‘{}’ mkdir -vp “/TARGET_FOLDER_ROOT/{}”

# TEST FIRST: REVIEW FILES TO BE MOVED
find . -type f -iname \*.mov -exec echo mv {} /TARGET_FOLDER_ROOT/{} \;

# EXECUTE MOVE FILES
find . -type f -iname \*.mov -exec mv {} /TARGET_FOLDER_ROOT/{} \;

Posted in Linux Leave a comment

Installing wkhtmltopdf on Ubuntu Server 12.04 or 14.04

Posted on

14.04

Steps:

  1. At first install xvfb server:
    sudo apt-get install xvfb
  2. Get needed version of wkhtmltopdf from http://wkhtmltopdf.org/downloads.html.For Ubuntu 14.04 64-bit:
    wget http://download.gna.org/wkhtmltopdf/0.12/0.12.2.1/wkhtmltox-0.12.2.1_linux-trusty-amd64.deb
  3. Install wkhtmltopdf:
    sudo dpkg -i wkhtmltox-0.12.2.1_linux-trusty-amd64.deb

    Install dependency (if needed):

    sudo apt-get -f install
Posted in Linux Tagged , ,
« Previous PageNext Page »