Delete any file in the current directory (and all of the subdirectories in the current directory) if there is a corresponding file which is not older than the file under a certain directory

This script: delete_old2.txt tries to delete any file in the current directory (and in all of the subdirectories in the current directory) if there is a corresponding file which is not older than the file under a certain directory which is input.

This script first tries to find all the files in the current directory (and in all the subdirectories in it).

The directory containing each found file, which is called "file A" in this document, is called "directory B" in this document.

The input directory, which should be compared, is called "directory C" in this document.

If there is a corresponding file, which is called "file D", in a corresponding directory, which is called "directory E" in this document, in the directory C, and if the file A is not newer than the file D, the file A is deleted.

If there is the file D in the directory E in the directory C, and if the file A is newer than the file D, it is reported.

If there is not the directory E in the directory C, it is reported.

If there is a file whose name is same as the directory E, it is reported.

If there is not the file D, it is reported.

It is confirmed that this script works as described in the above on debian jessie at 2016/8/27.
But, if the path of the files contains special character(s) such as a space, this script may delete important files and directories. DO NOT use this script if there is such paths in the current directory and/or in the input directory.

Old versions:
delete_old.txt has a bug. It removes any file, if the file D in the directory E in the directory C is the symbolic link to the file A.

This post is updated at 2016-08-27.

Simple mounter without udisks No.2

Simple GUI program using zenity, pcmanfm and gksu to mount/unmount partitions.
This program (script): http://blog-imgs-91.fc2.com/k/i/y/kiyoandkei/mountsupport10.txt tries to mount checked partitions by similar way as udisk command in Debian wheezy, that is, to mount the partition on a directory whose name is its UUID or its label under /media directory.

The former script for mounting simply is at http://kiyoandkei.blog68.fc2.com/blog-entry-85.html

This script can mount partitions in LVM, such as in /dev/mapper, although the former script cannot mount.

It is confirmed that this script works correctly on debian jessie at 2016/5/24.

Simple update-notifier for GUI

This script update-notifier.txt notifies if updatable packages exists or not on GUI in debian.
This script requires xterm.

Download update-notifier.txt and give execution permission like
$ chmod +x update-notifier.txt
and double click to execute.

Simple upgrader for GUI version 3

This script GUIupdate3.txt updates/upgrades packages on GUI in debian.
This script requires xterm.
This script opens a xterm window and asks root password and executes with root privilege only "apt update;apt full-upgrade;apt-get autoremove;apt-get autoclean;sleep 5".
Download GUIupdate3.txt and give execution permission like
$ chmod +x GUIupdate3.txt
and double click to execute.

kiyoshi's help update; cope with "PARTUUID=" output from blkid

kiyoshi's help is updated to cope with "PARTUUID=" output from blkid command.

The new init file is init160212.txt.

The update is only the addition of a space in front of the following words.
UUID=\"//'|sed -e 's/\".*//'
プロフィール

Author:kiyoshi
FC2ブログへようこそ!

最新記事
最新コメント
最新トラックバック
月別アーカイブ
カテゴリ
検索フォーム
RSSリンクの表示
リンク
ブロとも申請フォーム

この人とブロともになる

QRコード
QRコード
since 2011/9/25
現在の閲覧者数: