Last active
October 17, 2017 21:13
-
-
Save afbio/6405812663a5d6d5f49f321ffc2a2e8a to your computer and use it in GitHub Desktop.
Copy/Send files using xxd
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# WORKAROUND to use when "scp"/"kubectl cp"/"docker cp" is unvailable | |
# on local machine | |
xxd ~/file_aaa.xlsx > /tmp/bin_file_aaa | |
# md5sum to compare on end | |
md5sum ~/file_aaa.xlsx | |
# open and copy full content file | |
gedit /tmp/bin_file_aaa | |
# >>>> ctrl+a && ctrl+c | |
################################ | |
# ON pod/container | |
vi /tmp/remote_bin_file_aaa | |
#paste content and save | |
# reverse convert | |
xxd -r /tmp/remote_bin_file_aaa > /tmp/remote_file_aaa.xlsx | |
# compare this md5sum with the generated on start/local machine | |
md5sum /tmp/remote_file_aaa.xlsx | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment