Code Monkey home page Code Monkey logo

mismas's Introduction

mismas

A hodgepodge collection of various Unix scripts

test-acl-bounderies.sh

Is a script that can be used on Linux, HPUX and Solaris to test how many ACLs can be defined on a test file or directory. It requires 1 parameter; an integer number that defines how many users/groups will be recreated and applied to that file. The -c removes all users and groups automatically.

count_files_per_dir.sh

Is an extreme simple script to show all directories from a given path (or current path if empty) and display the amount of files per directory, e.g.

$ ./count_files_per_dir.sh  ~/bin
Start from directory /home/gdhaese1/bin
Directory /home/gdhaese1/bin contains 47 files

fix-TLS-Logjam-vulnerability.sh

Is a script to scan and fix the OpenSSL LogJam issue in httpd.conf file. It works on HP-UX and Linux, but it should alos work on Solaris (untested).

nanosleep.c

Is a simple C program to implement nanosleep intervals. The default value is 500 (=0.5 second) and it accepts a value between 1 and 999 (0.999 second or 1 second). It generates no output unless it detects an error then it shows the usage.

To compile use cc or gcc:

$ cc nanosleep.c -o nanosleep

timeout.c

A C program based on cratimeout.c, but using seconds as timeout values (instead of milleseconds). To compile use cc or gcc:

$ cc -o timeout timeout.c

The usage is equivalent as of the timeout command on Linux:

$ ./timeout 1 sleep 3
Terminated
$ echo $?
143
$ ./timeout 1 ls
...
$ echo $?
0
$ ./timeout
Usage: ./timeout seconds cmd args

shrc.hpux

A shell script to change the prompt to something like (on HP-UX):

[gdha@jupiter:/.root:160226.145608]

Date and timestamp automitically change per command executed, which is perfect in log files and for audit reasons. In the /etc/profile script add ENV=/etc/shrc.hpux ; export ENV to activate it the next time you login.

lan_monitoring.sh

Script for HP-UX systems only to assist in LAN cable migration tasks. Script was used during migration of CISCO switches and with this script we were able to follow LAN status during the migration phase.

make_rear_diskrestore_script.sh

Purpose of this script is to simulate the rear recover section which creates the /var/lib/rear/layout/diskrestore.sh script. It can be run on a production system and will not interfere with anything. The output has been made safe if we run it by accident so it does not overwrite your disk partition or wipe the boot disk. However, consider this as a warning - handle with extreme care. The output is meant for debugging purposes only (so you can see what a recover would execute to recreate your boot disk layout). Or, in case you are completely lost you can open an issue at https://github.com/rear/rear/issues But, if you expect an answer (on the diskrestore output) a rear subscription, rear support contract or donation is required. See details at http://relax-and-recover.org/support/sponsors

check_write_access.sh

Simplistic script to sum up all groups who have read/write rights on a directory structure - to be correct I am talking about ACLs not simple Unix groups. Scripts should work on all kind of Unix/Linux systems. The output is in CSV format. The input argument is a starting directory or can be empty, but then the current directory is used as starting point.

show_vm_snapshot_backups.sh

This script will display the Virtual Machine Snapshot overview made by NetBackup Data Domain.

$ bin/show_vm_snapshot_backups.sh -h
Usage: show_vm_snapshot_backups.sh [-i inventory] tier
[tier] is the ansible group name found in an inventory file of ansible

rebase_myfork_rear.sh

Simple script that can be used to rebase your personal fork of Relax-and-Recover (ReaR) with the master branch. Once the rebase is done you can hack on ReaR and make your pull request with the master branch. By doing this your code will be actual to the latest ReaR master branch and you do not have to fix code that was already fix by others.

rear2docker.sh

Script to generate a container image of the root file system of a ReaR recovery image. Just for the fun of it ;-)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.