El blog de Juan Palómez

13 enero 2016

Transfer files directly to local PC when using Citrix Receiver

Filed under: Uncategorized — thisisoneball @ 12:00

A typical scenario when connecting to remote systems using Citrix Receiver involves three systems:
(a) Local PC with Citrix client
(b) Intermediate system where the remote apps run, in this example Firefox, SecureCRT and WinSCP
(c) A final system in the same network as (b), in this example a Linux server

(a) — internet — (b) — LAN — (c)

To transfer files between (a) and (b) the Citrix system provides virtual disk drives (for example, real C: drive in (a) appears in (b) as a virtual drive, mapped to the UNC path \\Client\C$)

To transfer files between (b) and (c) normal file transfer programs can be used like WinSCP

To transfer between (a) and (c) you can use those same file transfer programs, as long as they support UNC paths. WinSCP doesn’t so you can use the SFTP feature in SecureCRT instead:

1) At (a) connect to Citrix and open the remote app list
2) Open SecureCRT which will be running in (b), then connect to (c) with your SSH/SFTP username/password and then open a SFTP session
3) At (c):
  sftp> lpwd
  C:/Users/.../Documents (some path in (b))
  sftp> lcd \\Client\C$\Users\myusername\Desktop (change to our destination path in (a))
  sftp> ls
     … (check that my files in (c) are in the current directory)
  sftp> get *2016*.bz2 (transfer them)

Any other program can be used instead of WinSCP as long as it supports UNC paths and is made available in the Citrix server by the adminsitrator

zmd5sum (MD5 of gzipped files)

Filed under: Uncategorized — thisisoneball @ 11:45

Two identical files produce non-identical files when they are compressed with gzip, as the .gz file stores the timestamp of the compression date.

You can use zdiff to compare the .gz files (compares the uncompressed files), but there is no equivalent for the md5sum command, to achieve something like this (md5sum of the uncompressed files) :

 

# md5sum a.gz b.gz c.gz
40e2dce65475145d867b11eb85fd1910 a.gz
5f8a9f6c37170473bdaf6901df907962 b.gz
cad655b312efdc1bd920c470b9532508 c.gz
# zmd5sum a.gz b.gz c.gz
ab7c6c68c3b3fe2ff17ab54aa3ada6d0 a.gz
ab7c6c68c3b3fe2ff17ab54aa3ada6d0 b.gz
ab7c6c68c3b3fe2ff17ab54aa3ada6d0 c.gz

To achieve that you can place this script into /usr/local/bin/zmd5sum:

#!/bin/bash
for f in $*
do
   md5=$(zcat $f | md5sum | cut -f1 -d\ )
   echo $md5 "" $f
done

 

Crea un blog o un sitio web gratuitos con WordPress.com.