• Home
  • Contacts
João Henriques
Random blog posts

Month: January 2014

Replacing strings with slashes – bash

Posted on January 27, 2014 by jhenriques

Since the replace of strings with slashes is not a linear task with the sed, here’s a tip:

cat <Original_File> | sed “s%”string_to_replace”%final_string%g” > Destination_File

Read more

Fixing web-server permissions

Posted on January 6, 2014January 6, 2014 by jhenriques

Three simple commands to fix the directory/files permission:

chown -R <user>.<group> <directory>

find <directory> -type f | xargs chmod 644

find <directory> -type d | xargs

Recent Posts

  • OpsSchool and vimtutor
  • Block them!
  • Fix wordpress permissions
  • Inline recursive replace string
  • Toolbox – Bash Read a File Line By Line

Recent Comments

  • jhenriques on Substituir router meo (TG784n) e utilizá-lo como ATA (versão PPPoE)
  • Vitor on Substituir router meo (TG784n) e utilizá-lo como ATA (versão PPPoE)
  • jhenriques on Substituir router meo (TG784n) e utilizá-lo como ATA (versão PPPoE)
  • Tiago Fernandes on Substituir router meo (TG784n) e utilizá-lo como ATA (versão PPPoE)
  • jhenriques on Substituir router meo (TG784n) e utilizá-lo como ATA (versão PPPoE)

Archives

  • June 2017
  • August 2016
  • January 2016
  • August 2015
  • July 2015
  • April 2015
  • March 2015
  • February 2015
  • December 2014
  • November 2014
  • June 2014
  • April 2014
  • February 2014
  • January 2014
  • December 2013
  • November 2013

Categories

  • OSX
  • Random
  • Safari
  • Systems
  • Uncategorized
  • wordpress

Meta

  • Log in
  • Entries RSS
  • Comments RSS
  • WordPress.org

Tags

centos centos 5 centos 6 conversion procedure vmware xen xen server
J.Henriques | 2019