ebash

enhanced bash

Home Table of Contents GitHub

Module filesystem

func directory_empty

Check if a directory is empty

ARGUMENTS

   dir
        dir

func directory_not_empty

Check if a directory is not empty

ARGUMENTS

   dir
        dir

func ebackup

Copies the given file to *.bak if it doesn’t already exist.

ARGUMENTS

   src
        src

func echmodown

echmodown is basically chmod and chown combined into one function.

ARGUMENTS

   mode
         Filesystem mode bit flag to pass into chmod.

   owner
         Owner to pass into chown

   files
         The files to perform the operations on.

func efreshdir

Recursively unmount the named directories and remove them (if they exist) then create new ones.

NOTE: Unlike earlier implementations, this handles multiple arguments properly.

func erestore

Copies files previously backed up via ebackup to their original location.

ARGUMENTS

   src
        src

func popd

Wrapper around popd to suppress its noisy output.

func pushd

Wrapper around pushd to suppress its noisy output.