Support Center > Search Results > SecureKnowledge Details
How to save time and date stamps in a file name using clish -c command Technical Level

If you want to save a file with out overwriting other files, or save an output using clish commands from Expert mode without overwriting previous output files:

  1. Log into Expert mode under the command line interface.
  2. Run clish -c "<clish command> <nameoffile>$(date +%d_%m_%Y_%H_%M_%S).<file extension>"
  3. Verify the output file name with ls -l
  • d - Date
  • m - Month
  • Y - full year, y - last two numbers in the year
  • H - Hour
  • M - Minute
  • S - Second

Example [Expert@gateway:0]# clish -c "save config runningconfig$(date +%d_%m_%Y_%H_%M_%S).txt"

Related Solutions:

sk98189 Clish command 'show configuration' on Gaia OS results in segmentation fault when user roles are defined (RBA)

sk68140 Migration from SecurePlatform to Gaia

This solution has been verified for the specific scenario, described by the combination of Product, Version and Symptoms. It may not work in other scenarios.
This solution is about products that are no longer supported and it will not be updated

Give us Feedback
Please rate this document