Re: Properties
- From: Thomas Løcke <tl@xxxxxxxxxx>
- Date: Fri, 03 Dec 2010 09:16:04 +0100
On 2010-12-03 04:34, Shark8 wrote:
Perhaps this is true in some degree; there are, however, some rather
serious design flaws and deficiencies. One deficiency is/was the
absence of a 'rename' command for files& directories; renaming is a
VERY common procedure for anyone managing their files; instead of
'rename' one is to use 'move' to achieve similar effect... there is
one HUGE problem with using move [because * expansion is required in
all *nix shells] you cannot rename groups of files.
ex:
DOS -> Ren *.p *.pas -- Renaming all .p files to .pas
*nix -> mv *.p *.pas -- becomes expanded...
-> mv 1.p 2.p 3.p test.pas -- test.pas from the dir
Or you can use rename:
$ rename .bak .txt *.bak
That renames all your .bak files to .txt.
The rename command has been part of the standard Linux tools for many
years. It's also readily available for FreeBSD and I suspect other
*BSD's as well. You're not forced to use mv to rename files.
Shell-scripting is loads of fun* too. {*And by 'fun' I mean
irritating, irregular, and surprisingly non-portable between different
'flavors'.} The following two-line script shows the POWER of *nix
shell-scripts:
#/bin/sh
$0&
A /bin/sh script is perfectly portable, if you intend to use it with the
Bourne Shell.
It's of course less portable if you try to use it with the C shell.
The shell-scripting is one reason; why in the name of Chaos would
someone want to use them [CSH or KSH or BASH]? In terms of power/
flexibility a LISP-based shell would be TONS more useful/managable...
though, admitidly it would require that one thinks in recursion.
If you don't like BASH, csh, zsh or Korn, then why not try
something like BUSH:
http://www.pegasoft.ca/bush.html
It has a very Ada-like approach to shell scripting.
The lack of types on files is another; old Macs had file-types down,
but *nix has nothing like that (nor does it have even the capability
for it, kernel-wise). {Windows has a [barely] workable file-extension/
association scheme -- analogous to an Ada map of (Key =>
File_Extention, Element => Application_Info).}
The "file" command is your friend.
It just works, and it doesn't depend on some shaky dot extension scheme.
Simple file->program association is handled well in both KDE and Gnome.
I suspect other desktop environments have similar systems in place. I
don't think this is a job for the kernel.
Lack of file versioning.* {Unix, Mac, and Win => Lose. VMS => Win.}
*File-versioning could save the arses of 90% of the lost/corrupted
file problems that I've encountered with MS Word users. i.e. the "my
kid selected the first twelve pages of my document and replaced it
with 'gsosdpofij' and I saved over it!" instantly becomes recoverable.
Hardly the fault of *nix, but of the file system you're using.
Or you could just use a VCS to track the directories and files that
needs versioning.
One single hyphenated-word: man-pages.
The old DOS hypertext help was superior to man=pages, windows .HLP
file help was/is superior to man-pages, the OpenVMS help-system is
FAR, FAR more usable than man-pages.
man rename
man file
What's wrong with that? It could not be any easier.
Do you want to search for a specific word?
man -K word
or a phrase?
man -K "my phrase"
Or using apropos:
man -k "determine file type"
and you get:
file [] (1) - determine file type
It's easy, flexible and it works.
Error codes? In *nix programs may or may not use them... (some
programs return 0/success when errors were encountered) which makes
them less than useless.
Hardly the fault of *nix, just as the abundance of horrible software
for Windows cannot be blamed on Windows itself.
--
Regards,
Thomas Løcke
Email: tl at ada-dk.org
Web: http:ada-dk.org
IRC nick: ThomasLocke
.
- References:
- Properties
- From: Shark8
- Re: Properties
- From: Randy Brukardt
- Re: Properties
- From: Charmed Snark
- Re: Properties
- From: Dmitry A. Kazakov
- Re: Properties
- From: Warren
- Re: Properties
- From: Dmitry A. Kazakov
- Re: Properties
- From: Warren
- Re: Properties
- From: Dmitry A. Kazakov
- Re: Properties
- From: Warren
- Re: Properties
- From: Randy Brukardt
- Re: Properties
- From: Warren
- Re: Properties
- From: Shark8
- Re: Properties
- From: Warren
- Re: Properties
- From: Dmitry A. Kazakov
- Re: Properties
- From: Warren
- Re: Properties
- From: Shark8
- Properties
- Prev by Date: Re: ANN: SPARK Proof Libraries
- Next by Date: Re: gnatcoll-gpl-2010: Problem with gnatcoll_db2ada
- Previous by thread: Re: Properties
- Next by thread: Re: Properties
- Index(es):
Relevant Pages
|