Problems With UNIX Standards

Discussions on more advanced topics such as monolithic vs micro-kernels, transactional memory models, and paging vs segmentation should go here. Use this forum to expand and improve the wiki!
SoulofDeity
Member
Member
Posts: 193
Joined: Wed Jan 11, 2012 6:10 pm

Re: Problems With UNIX Standards

Post by SoulofDeity »

gerryg400 wrote:
SoulofDeity wrote:Aside from confusion, one reason that I brought up the '/' root path was security. None of the UNIX tools question the actions of the root user, and when you don't make absolute paths explicit, you make it extremely easy to accidently destroy your filesystem by forgetting a single character.
The unix tools WILL question the user if the user wants them to. Just type "rm -i" if you feel you need to be queried. Additionally the root directory usually has its permissions set such that you cannot delete items from it. I really think you are imagining a problem where there actually isn't one.
I've heard people mention this before and imo, it is the most ignorant solution I've ever seen. It's like a kid sticking his finger in a hole so a dam doesn't leak. Just fix the friggin hole so the kid can go play. There should be no such thing as "if you feel you should be queried". Sooner or later, you're going to screw up, and when you do how you feel is going to be irrelevant. Skipping query should be explicit; like dos's "del /y"
Last edited by SoulofDeity on Tue Feb 10, 2015 7:33 pm, edited 1 time in total.
gerryg400
Member
Member
Posts: 1801
Joined: Thu Mar 25, 2010 11:26 pm
Location: Melbourne, Australia

Re: Problems With UNIX Standards

Post by gerryg400 »

SoulofDeity wrote:
gerryg400 wrote:
SoulofDeity wrote:Aside from confusion, one reason that I brought up the '/' root path was security. None of the UNIX tools question the actions of the root user, and when you don't make absolute paths explicit, you make it extremely easy to accidently destroy your filesystem by forgetting a single character.
The unix tools WILL question the user if the user wants them to. Just type "rm -i" if you feel you need to be queried. Additionally the root directory usually has its permissions set such that you cannot delete items from it. I really think you are imagining a problem where there actually isn't one.
I've heard people mention this before and imo, it is the most ignorant solution I've ever seen. It's like a kid sticking his finger in a hole so a dam doesn't leak. Just fix the friggin hole so the kid can go play.
Wait, you said the problem was that none of the tools question the action of the root user. I was just pointing out that at least one of them will. In my experience many sysadmins alias rm to rm -i. If that is not the problem, what is the real problem that you are trying to solve ?
Last edited by gerryg400 on Tue Feb 10, 2015 7:34 pm, edited 1 time in total.
If a trainstation is where trains stop, what is a workstation ?
SoulofDeity
Member
Member
Posts: 193
Joined: Wed Jan 11, 2012 6:10 pm

Re: Problems With UNIX Standards

Post by SoulofDeity »

gerryg400 wrote:Wait, you said the problem was that none of the tools question the action of the root user. I was just pointing out that at least one of them will. If that is not the problem, what is the real problem that you are trying to solve ?
There should be no such thing as "if you feel you should be queried". Sooner or later, you're going to screw up, and when you do how you feel is going to be irrelevant. Skipping query should be explicit; like dos's "del /y"
gerryg400
Member
Member
Posts: 1801
Joined: Thu Mar 25, 2010 11:26 pm
Location: Melbourne, Australia

Re: Problems With UNIX Standards

Post by gerryg400 »

SoulofDeity wrote:
gerryg400 wrote:Wait, you said the problem was that none of the tools question the action of the root user. I was just pointing out that at least one of them will. If that is not the problem, what is the real problem that you are trying to solve ?
There should be no such thing as "if you feel you should be queried". Sooner or later, you're going to screw up, and when you do how you feel is going to be irrelevant. Skipping query should be explicit; like dos's "del /y"
I think this is a matter of taste. Unix tends to take the line operations should be performed without interacting with the user as a default. This is a feature that helps make unix good for scripting and DOS and Windows poor for that purpose. As I said rm is often aliased to rm -i in user's profiles. Scripts can run as usual and the user gets a prompt if he wants.

BTW, I've never heard of del /y in Dos . I believe that del /p will cause a prompt much like Unix. Additionally I believe that some windows commands become non-interactive when executed from scripts. That's sort of inconsistency is just plain weird.
If a trainstation is where trains stop, what is a workstation ?
SoulofDeity
Member
Member
Posts: 193
Joined: Wed Jan 11, 2012 6:10 pm

Re: Problems With UNIX Standards

Post by SoulofDeity »

gerryg400 wrote:Additionally I believe that some windows commands become non-interactive when executed from scripts. That's sort of inconsistency is just plain weird.
The difference from Unix is that all DOS commands are interactive by default and can be explicitly automated. The only thing that changes when using batch scripts is that variables use %% instead of % for prefixes and you can enable variable expansion (which allows you to modify variables that you are conditionally checking against in if statements and loops) It usually only takes a split second for a person to realize they screwed up. It overlaps with the time you release you finger from the return key and look at the terminal before you enter a hysteric and panicked state to smash Ctrl-C in the milliseconds it takes for the file to disappear.
gerryg400
Member
Member
Posts: 1801
Joined: Thu Mar 25, 2010 11:26 pm
Location: Melbourne, Australia

Re: Problems With UNIX Standards

Post by gerryg400 »

SoulofDeity wrote:
gerryg400 wrote:Additionally I believe that some windows commands become non-interactive when executed from scripts. That's sort of inconsistency is just plain weird.
The difference from Unix is that all DOS commands are interactive by default and can be explicitly automated. The only thing that changes when using batch scripts is that variables use %% instead of % for prefixes and you can enable variable expansion (which allows you to modify variables that you are conditionally checking against in if statements and loops) It usually only takes a split second for a person to realize they screwed up. It overlaps with the time you release you finger from the return key and look at the terminal before you enter a hysteric and panicked state to smash Ctrl-C in the milliseconds it takes for the file to disappear.
Are you quite sure ? del deletes files without prompting in the cmd shell on a Windows 7 machine I just tried. What does the Windows/Doc standard say about this ?
If a trainstation is where trains stop, what is a workstation ?
SoulofDeity
Member
Member
Posts: 193
Joined: Wed Jan 11, 2012 6:10 pm

Re: Problems With UNIX Standards

Post by SoulofDeity »

gerryg400 wrote:Are you quite sure ? del deletes files without prompting in the cmd shell on a Windows 7 machine I just tried. What does the Windows/Doc standard say about this ?
I'd say that you're either lying or there's a registry key changing the behavior. Most likely the later. DOS was extremely configurable. You can even change the character used for switches from '/' to something else.
gerryg400
Member
Member
Posts: 1801
Joined: Thu Mar 25, 2010 11:26 pm
Location: Melbourne, Australia

Re: Problems With UNIX Standards

Post by gerryg400 »

SoulofDeity wrote:
gerryg400 wrote:Are you quite sure ? del deletes files without prompting in the cmd shell on a Windows 7 machine I just tried. What does the Windows/Doc standard say about this ?
I'd say that you're either lying or there's a registry key changing the behavior. Most likely the later. DOS was extremely configurable. You can even change the character used for switches from '/' to something else.
I'm sure if you check you'll find a third option (i.e. that del removes files without asking and only asks for directories). In this respect it's no better or worse than Unix rm which also deletes files without asking but doesn't delete directories unless a special option is provided.
If a trainstation is where trains stop, what is a workstation ?
SoulofDeity
Member
Member
Posts: 193
Joined: Wed Jan 11, 2012 6:10 pm

Re: Problems With UNIX Standards

Post by SoulofDeity »

gerryg400 wrote:I'm sure if you check you'll find a third option (i.e. that del removes files without asking and only asks for directories). In this respect it's no better or worse than Unix rm which also deletes files without asking but doesn't delete directories unless a special option is provided.
I've used DOS / Command Line since Windows 95 and in my experience the 'del' command has always asked me for permission unless I explicitly told it otherwise. Deltree even asks when deleting each file in a directory.

I've been strictly using Unix-based OS's for about a year and a half or 2 years, but I don't think my memory is that rusty.


From here,
DEL / ERASE
No contents entries on this page
Contents

Comments
Purpose: Erase one file, a group of files, or entire subdirectories


Format: DEL [ranges] [/A:[[-|+]rhsadecijopt /E /F /I"text" /K /L /N[defjnst] /O:[-]adegnrstu /P /Q /R /S[[+]n] /T /W[n] /X /Y /Z] [@file] file...


file The file, subdirectory, or list of files or subdirectories to erase.
@file A text file containing the names of the files to delete, one per line (see @file lists for details).



/A: (Attribute select)


/P(rompt)

/B (Delete after reboot)


/Q(uiet)

/E (No error messages)


/R(ecycle bin)

/F(orce delete)


/S(ubdirectories)

/I (match descriptions)


/T(otal)

/K (no Recycle Bin)


/W(ipe)

/L (delete symlinks)


/X (remove empty subdirectories)

/N (Disable)


/Y(es to all prompts)

/O:... (Order)


/Z(ap hidden and read-only files)


/Y The reverse of /P . It assumes a Y response to everything, including deleting an entire subdirectory tree. TCC normally prompts before deleting files when the name consists only of wildcards or a subdirectory name (see above); /Y overrides this protection and should be used with extreme caution!

The online documentation for the command line is almost always out of date from what I recall. I learned how to use it by reading the stuff output by '/?', trial, and error. You're right that /y wasn't originally a switch, but it was latter added to mirror deltree that did have it.
Last edited by SoulofDeity on Tue Feb 10, 2015 9:03 pm, edited 2 times in total.
gerryg400
Member
Member
Posts: 1801
Joined: Thu Mar 25, 2010 11:26 pm
Location: Melbourne, Australia

Re: Problems With UNIX Standards

Post by gerryg400 »

SoulofDeity wrote:
gerryg400 wrote:I'm sure if you check you'll find a third option (i.e. that del removes files without asking and only asks for directories). In this respect it's no better or worse than Unix rm which also deletes files without asking but doesn't delete directories unless a special option is provided.
I've used DOS / Command Line since Windows 95 and in my experience the 'del' command has always asked me for permission unless I explicitly told it otherwise. Deltree even asks when deleting each file in a directory.

I been strictly using Unix for about a year and a half or 2 years, but I don't think my memory is that rusty.
Ah, I see what happened. Your del command was probably aliased to deltree which does indeed behave as you expected. Again I will say this is precisely what Unix people do. This is del for XP but it's been like this since Dos 2. https://www.microsoft.com/resources/doc ... x?mfr=true

Anyway we are off-topic now.
If a trainstation is where trains stop, what is a workstation ?
SoulofDeity
Member
Member
Posts: 193
Joined: Wed Jan 11, 2012 6:10 pm

Re: Problems With UNIX Standards

Post by SoulofDeity »

gerryg400 wrote:Ah, I see what happened. Your del command was probably aliased to deltree which does indeed behave as you expected. Again I will say this is precisely what Unix people do. This is del for XP but it's been like this since Dos 2. https://www.microsoft.com/resources/doc ... x?mfr=true

Anyway we are off-topic now.
Perhaps, but as I editted in before I was ninja'd, the online documentation for the command line is way out of date from what I recall. The only way to see all of the options is to use the '/?' switch. That's how I learned to use everything.
gerryg400
Member
Member
Posts: 1801
Joined: Thu Mar 25, 2010 11:26 pm
Location: Melbourne, Australia

Re: Problems With UNIX Standards

Post by gerryg400 »

SoulofDeity wrote:
gerryg400 wrote:Ah, I see what happened. Your del command was probably aliased to deltree which does indeed behave as you expected. Again I will say this is precisely what Unix people do. This is del for XP but it's been like this since Dos 2. https://www.microsoft.com/resources/doc ... x?mfr=true

Anyway we are off-topic now.
Perhaps, but as I editted in before I was ninja'd, the online documentation for the command line is way out of date from what I recall. The only way to see all of the options is to use the '/?' switch. That's how I learned to use everything.
Here of course we see the advantage of the UNIX Standards. They are standard. You can learn things and they don't change. If you walk the well warn path there are no problems with the UNIX standard that have not been seen by others and which don't already have several solutions.

Forgive me for exaggerating here to make my point.
If a trainstation is where trains stop, what is a workstation ?
SoulofDeity
Member
Member
Posts: 193
Joined: Wed Jan 11, 2012 6:10 pm

Re: Problems With UNIX Standards

Post by SoulofDeity »

Well, back on topic, I just had an idea. I think the use of a single hosts file should be replaced with a database of multiple hosts files. The tradional hosts file is just a DNS ip cache for the www. The www is merely a service, and the internet can be used without it. What I'm thinking of is a peer to peer network. Just like in the past with DNS providers, there could be 'supernodes' in the network that have static ip's which they make available through books, advertisement, or even on the www. The users connect to a supernode which would update a list of other nodes and supernodes to form a list of peers. The peers would then exchange host information to resolve names. New domain names would be registered for free in a similar way to how bitcoin works; a race to see who is accepted by the most peers. This setup could also take advantage of torrents. Sites with more traffic would load faster than others in most cases.
User avatar
iansjack
Member
Member
Posts: 4703
Joined: Sat Mar 31, 2012 3:07 am
Location: Chichester, UK

Re: Problems With UNIX Standards

Post by iansjack »

SoulofDeity wrote:Well, back on topic, I just had an idea. I think the use of a single hosts file should be replaced with a database of multiple hosts files. The tradional hosts file is just a DNS ip cache for the www. The www is merely a service, and the internet can be used without it. What I'm thinking of is a peer to peer network. Just like in the past with DNS providers, there could be 'supernodes' in the network that have static ip's which they make available through books, advertisement, or even on the www. The users connect to a supernode which would update a list of other nodes and supernodes to form a list of peers. The peers would then exchange host information to resolve names. New domain names would be registered for free in a similar way to how bitcoin works; a race to see who is accepted by the most peers. This setup could also take advantage of torrents. Sites with more traffic would load faster than others in most cases.
You really are determined to screw things up that currently work perfectly well, aren't you? :)
The traditional hosts file is just a DNS ip cache for the www.
WTF is that supposed to mean? The hosts file existed long before the WWW and long before DNS; it is nothing to do with the WWW. It is becoming increasingly clear to me that you have little understanding of the philosophy behind Unix, which can basically be summed up as KISS, and are pretty shakey about some of the fundamentals. What do you think that DNS is all about other than that gobbledygook about "supernodes"?

By all means write your own OS with your own set of standards, but let's keep the tried and tested Unix standards clear of fiddling just for the sake of it.
Icee
Member
Member
Posts: 100
Joined: Wed Jan 08, 2014 8:41 am
Location: Moscow, Russia

Re: Problems With UNIX Standards

Post by Icee »

SoulofDeity wrote:That's how I learned to use everything.
It's a good thing to be self-reliant about your knowledge. If your knowledge is actually correct, that is.
Attachments
Untitled.png
Locked