Skip to content

Shell & python scripts which help me in everyday life

Notifications You must be signed in to change notification settings

WojciechMula/shell

Repository files navigation

Shell scripts

Allows to locate duplicated files (exact copies) in selected directories. The programs tries to be smart: firstly it groups files by size, then tries to compare a few first bytes of them and finally does full comparison.

The output is a list of path, so you decide what to do with duplicates.

Compare two directories; it either displays differences or prints shell commands required to make mirror of the first directory inside the second one.

For each file in directory prints its size and control sum (md5 or sha1).

I use it for storing extra checksums of files when burning CD/DVDs.

Compare two lists; list can be either 1) a custom file of strings or 2) directory for which a list of files will be created.

Lists are then treated as sets and we may computer:

  • sum,
  • differnce,
  • common part,
  • exclusive or (sum minus common part)

Revoke write rights of all files and directories in given directory.

I use it to protect my collections of files (photos, music, documents, etc.) from accidental removal.

Check if all JPEG files from given directory are valid; it uses standard jpeginfo tool.

I use it to check if backups of photos stored on CD/DVDs are OK.

For programmers: a simple Windows program that displays messages sent via network.

I used it to show notifications about completion of long-running processes executed on remote machines.

For programmers: sample /proc/pid/statm of given program.

I use it to determine real usage of memory; tools like valgrind massif does not consider everything.

For programmers: wait until a program of given program is started, then print its pid. I use it for attaching to a program when I can't control when/how it starts; for instance:

gdb -p `waitfor my-program`

About

Shell & python scripts which help me in everyday life

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published