Posts Tagged ‘physical server’

how to archive with Windows default zip (compress) algorithm

Tuesday, April 1st, 2014

windows-sent-to-compressed-file
I'm working on a decomissioning project (for those who hear decomissioning for a first time – in corporate world this means removal of service/s or assigned resources of a server or a physical server hardware that is not to be used in future or is obsolete). The decomissioning includes removal of Apache Tomcat (Software Configuration Item CI – in HP terms) from Microsoft Windows 2007 – Service Pack 2.
Part of decomissioning is of course to create backup of Tomcat Application server and for that I needed to create compressed archive of Tomcat instances. Usually I do archives on Windows using Winrar or Winzip but this time as the server productive server has the minimum installed there was no any external vendor produced archiving software available.

My memories from past were that there is a native compressing program embedded into Windows as I've unzipped compressed archives on Win hosts with no need for external WinZip. However until so far I never did .ZIP archive with no available external uncompress software.

Using Winzip or Winrar so far to make archive from a number of files I used to select files to enter Archive press right mouse button and select Create Archive (Add To Archive) so I expected this will work whenever no Winrar, however there was no obvious button like this, so I googled a bit to find out how is that possible ending up on Article from Microsoft titled "Compress and uncompress files (zip files)", there is a dumb proof video teaching Compressing files with Microsoft default ZIP program is done by the the weird "Send To" menu 🙂 

Selecting files to enter Archive;
> (Click Right Mouse Button) -> (Send To Compressed Zipped Folder)

compress_zipped_folder_with_windows_default_archive_algorithm how to archive with windows default compress archive

Honestly If I didn't checked the net probably I will never think of looking it there.

How to convert UTF-8 encoding files to Windows CP1251 on GNU / Linux

Friday, October 21st, 2011

I needed to convert a file which had a Bulgarian text written in UTF-8 encoding to Windows CP1251 in order to fix a website encoding problems after a move of the website from one physical server to another.

I tried first with enca( detects and convert encoding of text files from one encoding to another).

The exact way I tried to convert was:

linux:~# enca -L bg /home/site/www/includes/utf8_encoded_file.php
...
Unfortunately this attempt to conver was unsucesfully, and the second logical guess was to use iconvConvert encoding of given files from one encoding to another to do the utf8 to cp1251 conversion.
I reached for some help in irc.freenode.net, #varnalab channel and Alex Kuklin helped me, giving me an example command line to do the conversion.
iconv winedows to cp1251 conversion line, he pointed to me was:

linux:~# iconv -f utf8 -t cp1251 < in > out

Further on I adapted Alex’s example to convert my utf8_encoded_file.php encoded Bulgarian characted to CP1251 and used the following commands to convert and create backups of my original UTF8 file:

linux:~# cd /home/site/www/includes
linux:/home/site/www/includes# iconv -f utf8 -t cp1251 < utf8_encoded_file.php in > utf8_encoded_file.php.cp1251
linux:/home/site/www/includes# mv utf8_encoded_file.php utf8_encoded_file.php.bak
linux:/home/site/www/includes# mv utf8_encoded_file.php.cp1251 utf8_encoded_file.php