GithubHelp home page GithubHelp logo

laf111 / linuxtoolbox Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 24.86 MB

Set of scripts to manage files, links and processes under Linux/UNIX

Shell 92.97% MATLAB 3.17% Batchfile 3.87%
linux shell filesystem process symlink

linuxtoolbox's Introduction

Here is my set of scripts and the configuration i use under Linux.

PROMPT

LinuxToolBox

ALIASES

  • h='history'
  • mkdir='mkdir -pv'
  • meminfo : (see env.sh) get memory informations and the first 10 most demanding processes
  • cpuinfo='lscpu'
  • cpr='cpr.sh'
  • cpl='cp -rL'
  • getAllMyProc='ps -eaf | grep -v "grep" | grep '$USER
  • getAllMyChildProc='ps -eaf | grep -v "grep" | grep '$USER' | grep '$$
  • getChildProc='pgrep -l -P '$$
  • size='sudo du -hs' ( !!! sudo users only !!!)
  • rexplorer='sudo nautilus --no-desktop --browser' ( !!! sudo users only !!!)
  • clear : (see env.sh) clear console screen

AVAILABLE SCRIPTS

See above or launch ./SCRIPTS/listTools.sh to get the list

Most interesting scripts are :

killProcessTree.sh : kill a process tree (process and his subprocesses) "softly" It searches for final children process tree, kill them from the softly to the harder (kill -9) and treats the processes' stack backwardly.

killProcessMatchingPattern.sh

findInFiles.sh, replaceInfiles.sh, renameFiles.sh : what every OS should have...

linkPath.sh and linkPathCreatingdirs.sh : used to create links trees. The difference reside in : for the last one, it re-creates the relative path using folder and so do not corrupt the source location if you create file in there (like you would if you use symlinks on folders themselves)

findBrokenLinks.sh replaceLink.sh and replaceLinks.sh : detect broken links, replace link(s) with their target

updateLink.sh and updateLinks.sh : to change the target location of a link (broken or not)

diffFile.sh and diffFolder.sh : diff tools that can ignore lines/nodes in ASCII files (powerfull on XML files with the ability of ignoring nodes order). You can customize the final tools to use to compare file upon the extension criterion.

checkPathContent.sh : tool to validate a path (files and folder in) based on regular expression

Symlinks handling scripts allow to create your own configuration management tool. If you manipulate "big data", it alllows you to not duplicate them on your disk.

  • linkPathCreatingdirs.sh : create your "trunk" tree containing only symlinks to files.
  • replaceLink(s).sh : acts like a "checkout" if you need to modify a file
  • updateLink(s).sh : update symlinks if you moved targets

INSTALL

Launch install.sh

It will add a line in your bashrc to source the tool box.

Linux Tool Box is added to your path so the scripts are available everywhere.

UNINSTALL

Remove the line in your bachrc under # sourcing linux tool box

linuxtoolbox's People

Contributors

laf111 avatar

Watchers

 avatar

linuxtoolbox's Issues

MobaXterm : dates handling issue

j2000_obtRef2str.sh 668248161.0
date: invalid date '2000-01-01 668248161.0 sec'

scripts j2000*.sh are broken under MobaXterm

TODO : fix or isolate to Lunix

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.