View on
Mathias Weidner > Directory-Organize > mkdir_heute


Annotate this POD


New  1
Open  0
View/Report Bugs


mkdir_heute - create and find directories interactive


  mkdir_heute --basedir=~/archive

  mkdir_heute --listlines=15


This documentation refers to version 0.9.


This script scans a basedir (~/A) for directories named YYYY/MM/DD where YYYY, MM and DD are numbers corresponding to a year, month, day of month and prints them on STDERR.

The script returns the choosen directory on STDOUT and may be used in a shell alias like this:

  alias cdheute='cd `mkdir_heute`'

so that you may say 'cdheute' on the command line and your working directory will be changed to the choosen directory.

When invoked you may


Command Line Arguments


With this argument it is possible to redirect the script to another base directory under which it scans for project descriptions to display. A new directory would be created below this directory.

  mkdir_heute --basedir=~/archive

  mkdir_heute -b ~/archive

Since it is possible that on some systems Term::ReadKey::GetTerminalSize() does not deliver a meaningful value, you may skip the invocation of that function by providing the nummer of lines for the listing of descriptions on the command line.

  mkdir_heute --listlines=15

  mkdir_heute -l 15


Unable to get Terminal Size. The TIOCGWINSZ ioctl didn't work. The COLUMNS and LINES environment variables didn't work. The resize program didn't work. at /usr/lib/perl5/Term/ line 343.

This happened to me especially on elder systems when invoked via backtics such as

  cd `mkdir_heute`

although the program works fine when invoked directly.

One workaround is to install the program resize which comes on Debian GNU Linux within the package xutils.

If you can't install the program resize, you could start mkdir_heute with a fixed number of list lines like this

  cd `mkdir_heute -l 25`


Mathias Weidner


Copyright (c) 2009 Mathias Weidner ( All rights reserved.

This module is free software; you can redistribute and/or modify it under the same terms as Perl itself. See perlartistic.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

syntax highlighting: