Skip to content

kealennieh/shell_tools

Repository files navigation

Introduction

This repository contains some useful tools to increase efficiency and productivity.

Requirements

  • ubuntu

How to use

  1. clone this repository.
git clone [email protected]:kealennieh/tools.git
  1. add the repository into your system path.
vim ~/.bashrc 
export PATH=$PATH:/home/xxx/shell_tools
source ~/.bashrc
  1. enjoy the tools.

Usage

  1. copy the previous files into target folder.
sheCopyHead.sh -n <number> -d <target_folder>

eg: sheCopyHead.sh -n 10 -d ~/work
  1. copy the last files into target folder.
sheCopyTail.sh

eg: sheCopyHead.sh -n 10 -d ~/work
  1. display the size of current folder.
sheDu0.sh

eg: sheDuo.sh
  1. display the size of all the folders in current folder.
sheDu1.sh

eg: sheDu1.sh
  1. erase the duplicate row in file. this tool is used to git rid of the duplicate row in file.
sheEraseDuplicate.sh -f <file> -t <target>

eg: sheEraseDuplicate.sh -f test.txt -t target.txt
  1. find the string in files in folder.
sheFindStrInFile.sh -d <dir> -s <str>

eg: sheFindStrInFile.sh -d . -s test
  1. find the str in files in current folder.
sheGrepLocal.sh -s <string>

eg: sheGrepLocal.sh -s error
  1. kill the process started by python in cuda.
sheKillPythonInCuda.sh -i <number>

eg: sheKillPythonInCuda.sh -i 0
  1. kill zombie process
sheKillZombie.sh
  1. display the previous files, which are sorted by time.
sheLsTimeHead.sh
  1. display the memory
shePsMem.sh
  1. display the zombie process
shePsZombie.sh
  1. remove the files by time and store the latest file. this tool is used to remove the previous logger files in tensorboard.
sheRemoveByTime.sh
  1. copy files increamentally. this tool is quite useful when we copy large files.
sheRsync.sh -s <src_folder> -d <destination_folder>

eg: sheRsync.sh -s test -d ~/work
  1. start a http server in current folder.
sheSimpleServer.sh
  1. copy the file/folder to the target folder of another server by scp.
sheToRemote.sh -f <file>
sheToRemote.sh -d <dir> 

eg: sheToRemote.sh -f test.txt
  1. display the panel of nvidia
sheWatchNvidia.sh
  1. check the number of row in file. this tool is used to check the file when we merge various file into one.
sheWcFile.sh -f <file>

eg: sheWcFile.sh -f test.txt
  1. enter the latest folder.
sheCdLatestFolder.sh

Todo

  • remove the files by time and store the latest file.

Citation

cite yourself~

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages