Is there an unzip command on ExtremeXOS?

  • 0
  • 1
  • Question
  • Updated 2 years ago
  • Answered
I have a telnet connection with my switch using a C++ program I've written. I then have to upload 300-350 .xsf scripts to the switch using tFTP. The problem I have is that uploading the scripts takes around 2 minutes. In other sections of my code I have to wait just for this transfer to complete.

If I zip these files and upload just one big zip file the transfer is much faster, 10-12 seconds. But I have not found a way to unzip the scripts once the zip file is on the switch. Is there a way I could unzip the files?

I'd appreciate any other comment/suggestion.
Photo of Ali Askari

Ali Askari

  • 272 Points 250 badge 2x thumb

Posted 2 years ago

  • 0
  • 1
Photo of Jeremy

Jeremy, Embassador

  • 9,788 Points 5k badge 2x thumb
I don't believe there is.
Photo of Drew C.

Drew C., Community Manager

  • 37,364 Points 20k badge 2x thumb
There's definitely not an unzip command.  The switch can tar and untar, but those aren't options available in the CLI.

Now, I don't know what your scripts are doing, but it sounds like it would be much easier for you to run them remotely so you have one repository, rather than potentially hundreds scattered across your network.  Surely there is a better way to do this.
Photo of Ali Askari

Ali Askari

  • 272 Points 250 badge 2x thumb
Thanks Andrew. Where can I use the tar and untar commands?

How can I run a script remotely. I checked the documentation and I can't find how I can use `load script script.xsf` when the script is not available on the switch?
Photo of Drew C.

Drew C., Community Manager

  • 37,364 Points 20k badge 2x thumb
Hi Ali,
The ability to tar and untar aren't accessible from the CLI.  They're "under the hood" for other processes, like the upload debug command.

To run scripts remotely, the script itself would need to connect to the switch via telnet or SSH session to run the commands.  There's a few other threads here on The Hub (I can help find them later) where this is discussed.
Photo of Grosjean, Stephane

Grosjean, Stephane, Employee

  • 12,562 Points 10k badge 2x thumb
if you're running 15.6 or higher, Python is available, so you should be able to add the right module (if not already present) to do the unzip "yourself".
Photo of Ali Askari

Ali Askari

  • 272 Points 250 badge 2x thumb
Thanks for your suggestion but unfortunately that's not an option. Because I won't know the OS version for the switches that my program should communicate with.