Unzip a tar.gz file - pentaho

I'm newbie in Pentaho Spoon
I'm trying to unzip a tgz file but I can't find a transformation or job that does it, the closest thing I found was the "Unzip file" job which doesn't let me unzip the tgz file.
Does anyone know whether or not you can unzip a tgz file in Spoon?
In the event that it is not possible.. Do you know any method that comes close?
Thanks!

You could use a Shell step in a job to unzip the file using the OS shell script capabilities instead of PDI.

Related

Unzip multiple files in multiple folders in ssis [duplicate]

I have a .tar.gz file. Now i need to unpack these files with SSIS package. Previously did unzip and delete for .zip files with the help of For each container and script task. Not sure how to do it for .tar.gz files. Any help?
You can use an execute process task to achieve this (or using process from Script task), but you have to install a ZIP application like 7Zip or Winzip or else. And use command line to Zip or Unzip archives.
Follow one of these links for more details:
Zip a folder using SSIS
7Zip command line examples
What command line parameters does WinZip support?

Move files from Azure storage to a local directory

I want to move all the files that in a File share on azure. I can do it at the moment by following way using:
Use "net" command to connect to the network drive and assign it a drive letter
Then there's a bat file that uses "move" command like move g:\files\* c:\files to then move the files which runs every hour to check if there are files and move them using windows task scheduler.
But I don't want to use this way because:
The drive will be disconnected if the Machine needs a restart and hence the process doesn't remain automated as someone will have to mount the drive again
The "move" command doesn't moves folders, it moves only files.
Is there a better way of managing this? We don't want to install tools like AzCopy but using Powershell is feasible.
According to your description, I suggest you can do it as the following ways:
1.Call Azcopy in PowerShell.
You could install Azcopy firstly, you could download the latest version from the link. Azcopy supports upload directory to Azure fileshare. You could use the following command.
AzCopy /Source:C:\myfolder /Dest:https://myaccount.file.core.windows.net/myfileshare/ /DestKey:key /S
Then you could write a bat script to call Azcopy, by default Azure install directory is C:\Program Files (x86)\Microsoft SDKs\Azure\AzCopy.
cd "C:\Program Files (x86)\Microsoft SDKs\Azure\AzCopy"
&.\AzCopy.exe /Source:C:\myfolder /Dest:https://myaccount.file.core.windows.net/myfileshare/ /DestKey:key /S
Use PowerShell Script, you could use to this link. The script use for ASM mode, you should change some command.
Based on my experience, using Azcopy is more easily and simpler.
The issue was resolved using the following approach:
Delete any existing mapped drive to the drive letter we are using with the net use <drive_letter> /delete command. This is done to make sure the drive was detached since the last time script ran
Map the drive again using the net use command
Copy all the files using robocopy
After that delete all the files using del command
Disconnect the drive now using the net use <drive_letter> /delete command

Yii2 archive installation symbolic link issue

I am trying to install Yii framework via archive file in Windows 7...after downloading the file I tried extracting it into a folder in my C:\wamp\www\bid location, however, I encounter an error saying this:
! C:\wamp\www\bid\yii-basic-app-2.0.2.tgz: Cannot create symbolic link C:\wamp\www\bid\basic\vendor\bin\markdown
A required privilege is not held by the client.
! C:\wamp\www\bid\yii-basic-app-2.0.2.tgz: Cannot create symbolic link C:\wamp\www\bid\basic\vendor\bin\yii
A required privilege is not held by the client.
I thought that perhaps Winrar can't extract tgz files so I downloaded 7-zip...Using 7-zip it extracted into a tar file and the tar file was extracted with no errors...For some reason though I do not seem to have the framework folder that seem to be in other people's directory structure...Moreover after trying create my own framework folder and performing this command:
yiic webapp C:\wamp\www\bid
It states that yiic is not recognized as an internal or external command
Can someone tell me what I'm doing wrong...I've tried setting this up numerous times and failed
You need to run 7-Zip File Manager in administrator mode.
Right-click the icon of 7-Zip File Manager, and then click "Run as administrator".
you need to call the command with php since it is actually a external command, i do it like this
php ./yiic webapp NameOfApp
This way your terminal understand that yii is a program that runs with php.
Another solution is to add the yii path to your environmental variable, regards

how to use DEXtoJar

I find the solution to decompile a file dex to jar from this link http://code.google.com/p/dex2jar/downloads/list but i don't understand how to use it.
Follow the below steps to do so_
Rename your APK file(e.g., rename your APK file to .zip Ex- test.apk -> test.zip) & extract resultant zip file.
Copy your .dex file in to dex2jar folder.
Run setclasspath.bat. This should be run because this data is used in the next step.
Go to Windows Command prompt, change the folder path to the path of your dex2jar folder and run the command as follows:
d2j-dex2jar.bat classes.dex
enjoy!! Your jar file will be ready in the same folder with name classes_dex2jar.jar.
Hope this helps you and All reading this... :)
Download dex2jar https://code.google.com/p/dex2jar/downloads/list
Run dex2jar on apk d2j-dex2jar.sh someApk.apk
open jar file in JD GUI http://jd.benow.ca/
Follow this guide: https://code.google.com/p/dex2jar/wiki/UserGuide
--Update 10/11/2016--
Found this ClassyShark from Google's github pretty easy to view code from APK.
https://github.com/google/android-classyshark
// make sure that you downloaded release https://github.com/pxb1988/dex2jar/releases (for the ppl who coldnt find this link in /dex2jar/downloads/list
Step 1 extract the contents of dex2jar.*.*.zip file
Step 2 copy your .dex file to the extracted directory
Step 3 execute dex2jar.bat <.dex filename> on windows, or ./dex2jar.sh <.dex filename> on linux
Simple way
Rename your test.apk => test.zip
Extract test.zip then open that folder
Download dex2jax & Extract
Copy classes.dex file from test folder
Past to dex2jar Extracted folder
if use windows press Alt & D keys then type cmd press Enter(open to cmd)
run the command d2j-dex2jar.bat classes.dex
Download JD-GUI
Move classes-dex2jar.jar file to JD-GUI
Everything Done..
old link
the link http://code.google.com/p/dex2jar/downloads/list is old, it will redirect to https://github.com/pxb1988/dex2jar
dex2jar syntax
in https://github.com/pxb1988/dex2jar, you can see your expected usage/syntax:
sh d2j-dex2jar.sh -f ~/path/to/apk_to_decompile.apk
can convert from apk to jar.
want dex to jar
if you have dex file (eg. using FDex2 dump from a running android apk/app), then you can:
sh d2j-dex2jar.sh -f ~/path/to/dex_to_decompile.dex
can got the converted jar from dex.
example:
/xxx/dex-tools-2.1-SNAPSHOT/d2j-dex2jar.sh -f com.huili.readingclub8825612.dex
dex2jar com.huili.readingclub8825612.dex -> ./com.huili.readingclub8825612-dex2jar.jar
want jar to java src
if you continue want convert from jar to java sourcecode, then you, have multiple choice:
using Jadx directly convert dex to java sourcecode
first convert dex to jar, second convertjartojava sourcecode`
Note
how to got d2j-dex2jar.sh?
download from dex2jar github release, got dex-tools-2.1-SNAPSHOT.zip, unzip then got
you expected Linux's d2j-dex2jar.sh
and Windows's d2j-dex2jar.bat
and related other tools
d2j-jar2dex.sh
d2j-dex2smali.sh
d2j-baksmali.sh
d2j-apk-sign.sh
etc.
what's the full process of convert dex to java sourcecode ?
you can refer my (crifan)'s full answer in another post: android - decompiling DEX into Java sourcecode - Stack Overflow
or refer my full tutorial (but written in Chinese): 安卓应用的安全和破解
If anyone is still looking for an easy way to decompile an APK (with resource decompiling), have a look at the tools I have created: https://github.com/dirkvranckaert/AndroidDecompiler
Just checkout the project locally and run the script as documented and you'll get all the resources and sources decompiled.
You can decompile your .apk files and download online.
http://www.javadecompilers.com/
Download latest dex2jar from here -> dex2jar
Run this command on linux -> sh d2j-dex2jar.sh classes.dex
Download java decompiler from here - > JD-GUI
Drag and drop the classes-dex2jar.jar file to JD-GUI
If you're looking for the version for windows get it from source forge:
https://sourceforge.net/projects/dex2jar/
It has the d2j-dex2jar.bat file you need
Download Dex2jar and Extract it.
Go to Download path
./d2j-dex2jar.sh /path-to-your/someApk.apk
if .sh is not compilable, update the permission: chmod a+x d2j-dex2jar.sh.
It will generate .jar file.
Now use the jar with JD-GUI to decompile it
After you extract the classes.dex file, just drag and drop it to d2j-dex2jar
Can be used as follow:
Download dex2jar here and extract it.
Download Java decompiler here (If you want to investigate .class file)
Get you release .apk file and change its extension with .zip
Extract .zip and find the classes.dex and classes2.dex
Paste these files into dex2jar folder where .bat file exist of dex2jar (normally names as d2j-dex2jar)
From dex2jar folder, open cmd [Shift+right click to see option to open cmd/power shell]
Type the command in cmd: d2j-dex2jar release.apk
You will get the .class file, open this file into Java Decompiler.
The below url is doing same as above answers. Instead of downloading some jar files and doing much activities, you can try to decompile by:
http://apk-deguard.com/

Visual Basic Edit Tar Archive

Is it possible for vb to extract files from tar(and put them back)? I found this but it says that
Dim tar As New ChilkatTar <<<< ChilkatTar does not exist
I am trying to edit one xml file(which is not compressed) but if i do that with notepad, the tar becomes corrupt
ChilkatTar is a commercial component that you'd need to purchase, you can find it here:
7-zip supports unpacking and packing TAR files and is free so you could probably execute the command line version of it from your app to do the packing/unpacking.
It is also open-source, so you might even be able to copy the source into a library to use from your own application if you prefer, assuming that its license is compatible with your needs.