Re: Properties



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
.



Relevant Pages

  • Re: Great SWT Program
    ... a good tutorial on Unix CLI tools? ... command there, ... then rename everything in the search scope with the CLI, ... I'd have to boot up a Windows system and try stuff, ...
    (comp.lang.java.programmer)
  • Re: How To Make index.shtml As A Home Page?
    ... is the correct command, but will only be effective if AllowOverride All ... overridden (provided AllowOverride is set) using .htaccess as you have done. ... > DirectoryIndex index.shtml index.html index.htm index.php ... you should be able to open your online web in FrontPage and rename ...
    (microsoft.public.frontpage.client)
  • Re: The rename =?windows-1252?Q?command=85?=
    ... From the very beginning of Linux the Windows users had to ... learn that rename is not part of the commands. ... When first starting to use computers, if we do not count the very first ... I accidently found that rename command, ...
    (Ubuntu)
  • Re: Using wildcards with mv
    ... Windows / OS/2 prompt, but the same idea is not working for me at a ... In a Unix shell, wildcards are expanded by the shell, not by the ... The command sees only the result of the expansion. ... There are a couple of rename commands, ...
    (comp.unix.shell)
  • Re: Cant Rename a File Using WinXP Command Prompt!!!
    ... It needs to be given a shorter name so that it can be ... I cannot rename it using the Command Prompt and the ... The old filename in question contains the following symbols as ...
    (microsoft.public.windowsxp.help_and_support)