Skip to content

Instantly share code, notes, and snippets.

View SumitDasSAPBasis's full-sized avatar

Sumit Das SumitDasSAPBasis

  • Linde PLC
  • 09:16 (UTC +05:30)
View GitHub Profile
@SumitDasSAPBasis
SumitDasSAPBasis / CleanupFiles.md
Last active May 4, 2022 05:57
Cleanup Files based on Year Month Date

Script to delete old files lesser than a particular day

This one liner command - deletes files in a directory tree that are less than 5 days old, and asks if it is okay to delete each file:

Code Snippet #1:

find /path/to/directory -mtime -5  -ok  rm -f {} \;

Explanation:

  • mtime- modification time older than 5days in this case
  • -f – files to be deleted
@SumitDasSAPBasis
SumitDasSAPBasis / SAPmonitoring.sh
Last active June 7, 2022 07:31
SAP Monitoring
#!/bin/bash
# 2022 04 19
# NAME
# Monitoring SAP Systems
# 1. SM51 - sapcontrol
# 2. SM50 - sapcontrol
# 3. DB12 -
# 3.a. DCS3 - /<db>/<sid>/sapbackup/*.anf
# 3.b. FCI/SYB - localbackup