Tag Archives: files

Linux: HEX edit and diff in a shell

Hi,

let us assume you want to edit a binary file /tmp/binfile and you want to replace all strings matches to “sda” by “hda”.

gnu sed can edit bin files by the \xnn hex notation. The option –in-place changes the original file and makes a backup copy with a file extension .org

michael@devdeb ~#  sed -e 's/\x73\x64\x61/\x68\x64\x61/g' /tmp/binfile --in-place=.org

Continue reading Linux: HEX edit and diff in a shell

Powershell: Profile locations

Hi,

if you want to customize your environment powershell has ability to load or execute some scripts at startup.

There are 4 files where you can define functions, aliases … The AllHosts variables does not mean Computers. Allhosts is relating to Programs with has an Interface to Powershell, for example Powershell itself, Powershell ISE and so on. While currenthost means a specfic program. The currenthost variables differ from Powershell to Powershell ISE.
Continue reading Powershell: Profile locations

Windows: Extract all files from a msi file

Hi,

first post in 2015 🙂

msiexec offers the ability to extract all files included in an msi file to a specified folder by alter the TARGETDIR proberty of the msi package.

Syntax is
msiexec /a msifile.msi /qb TARGETDIR=D:\target
Continue reading Windows: Extract all files from a msi file