Re: Why no recycle bin in UNIX (391 Views)
Reply
Honored Contributor
Kapil Jha
Posts: 1,478
Registered: ‎01-23-2006
Message 1 of 13 (391 Views)

Why no recycle bin in UNIX

[ Edited ]

Hello Gurus,
Can I have a quick discussion as to why unix creator did not include feature for recycle bin.Can we have trashcan kind of facility , like from AdvFS , in vxfs and HFS.

Your replies are highly appreciated.
BR,
Kapil

 

 

P.S. This thread has been moved from HP-UX > Databases to HP-UX > sysadmin. - Hp Forum Moderator

I am in this small bowl, I wane see the real world......
Please use plain text.
Honored Contributor
Kapil Jha
Posts: 1,478
Registered: ‎01-23-2006
Message 2 of 13 (391 Views)

Re: Why no recycle bin in UNIX

Oops... I created thread in database , please move it to system admin.
BR,
Kapil
I am in this small bowl, I wane see the real world......
Please use plain text.
Honored Contributor
V. Nyga
Posts: 4,874
Registered: ‎09-20-2002
Message 3 of 13 (391 Views)

Re: Why no recycle bin in UNIX

Hi Kapil,

CDE has a trashcan at the right side ...
You can use it when you work in the file manager of CDE.
If you use the command line (rm) then you would have to create an alias for rm.
For example
alias rm script
Your script has to move the files to $HOME/.dt/Trash.

Volkmar
*** Say 'Thanks' with Kudos ***
Please use plain text.
Acclaimed Contributor
Dennis Handly
Posts: 24,962
Registered: ‎03-06-2006
Message 4 of 13 (391 Views)

Re: Why no recycle bin in UNIX

>I created thread in database, please move it to system admin.

(Moderators don't like moving from one category to another in popular forums, where they expect everyone to read every thread.)

Because big boys don't admit to making mistakes? ;-)

If you want one, you can roll your own rm. Here are some old threads about your topic:
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1166683
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1050654
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1033162
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=939680
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=66836
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=59753
Please use plain text.
Acclaimed Contributor
James R. Ferguson
Posts: 21,184
Registered: ‎07-06-2000
Message 5 of 13 (391 Views)

Re: Why no recycle bin in UNIX

Hi Kapil:

Why no recycle bin? Well to save precious disk space no doubt in the days when disk, memory, I/O and CPU were precious commodities not to be capraciously wasted --- something that some bloated software would do well to remember in my opinion.

In keeping with DWIM (Do What I Mean), if you ask to remove a file it is removed. No messages; no fuss; poof!

Removing a file without futher ceremony conforms to Unix's Rule of Least Surprise: Do what was asked.

Regards!

...JRF...
Please use plain text.
Honored Contributor
V. Nyga
Posts: 4,874
Registered: ‎09-20-2002
Message 6 of 13 (391 Views)

Re: Why no recycle bin in UNIX

@JRF - great, ROFL :-))))))))))))
*** Say 'Thanks' with Kudos ***
Please use plain text.
Honored Contributor
Bob E Campbell
Posts: 764
Registered: ‎03-31-2004
Message 7 of 13 (391 Views)

Re: Why no recycle bin in UNIX

The CDE comment is on the right track. If you open up a DOS window and remove a file, it will not be placed in the recycle bin. If you use a file manager, most of them provide the support.

You can easily define a wrapper to rm to provide the ability from a shell window. Just be sure to define a cron job to empty the bin.
Please use plain text.
Honored Contributor
Kapil Jha
Posts: 1,478
Registered: ‎01-23-2006
Message 8 of 13 (391 Views)

Re: Why no recycle bin in UNIX

Like in windows if we remove data from recycle bin then also some software recover data.
Why this was not developed in UNIX , if accedental we remove a file we only lose the inode link we have , file is physically present on the disk so this is my question
why no unrm??
sorry if m getting weired but curiosity ;)
BR,
Kapil
I am in this small bowl, I wane see the real world......
Please use plain text.
Acclaimed Contributor
Dennis Handly
Posts: 24,962
Registered: ‎03-06-2006
Message 9 of 13 (391 Views)

Re: Why no recycle bin in UNIX

>if accidentally we remove a file we only lose the inode link we have, file is physically present on the disk

10 seconds later that area on the disk may be overwritten.
As Volkmar and Bob say, if you want unrm, use the trashcan in CDE.

>why no unrm??

Because a temporary limbo has to be designed into rm(1).
Please use plain text.
Acclaimed Contributor
James R. Ferguson
Posts: 21,184
Registered: ‎07-06-2000
Message 10 of 13 (391 Views)

Re: Why no recycle bin in UNIX

Hi Kapil:

>Kapil: Like in windows if we remove data from recycle bin then also some software recover data. Why this was not developed in UNIX...why no unrm??

Again, I would respond with: Well, when do you *really* mean *remove*?

Certainly there are temporary files that processes create that would be a grand waste to confine to a recycle bin instead of casting them into oblivion.

If nothing else, you can create an alias for 'rm' that adds the '-i' switch to force you to confirm deletion in interactive settings:

# alias rm='rm -i'

Of course, this only applies to your current shell session and does not propagate to any script you run therein; nor unconditionally would you want it to do so.

If the idea of permanently removing a file bothers you, ask yourself if you *always* make a backup of every file you change?

As already noted, you can write a shell wrapper around a command and move or copy any file you want before manipulating it. In this fashion you can craft your own re-cycle bin.

A properly setup Unix server only allows the 'root' user to remove (or write to) "system" directories, like '/usr'. Non-root users can't harm your system, unless they promote themselves programatically or otherwise to a privileged level. As an administrator, you control (and hopefully prevent) this. Thus what a normal user does to hurt themselves is their own doing.

For me, it reduces to "think before you act", and have appropriate disaster recovery procedures in place for (hopefully rare) times of simple stupid, catastrophic mistakes.

Regards!

...JRF...
Please use plain text.
Honored Contributor
V. Nyga
Posts: 4,874
Registered: ‎09-20-2002
Message 11 of 13 (391 Views)

Re: Why no recycle bin in UNIX

Hi again,

ok - one more tipp - use a file server who uses snapshots.
This really help me with my **** users.
About once a month one user comes to me and says that he has overwritten the wrong file.
The user directories are nfs mounted from a filer.
Then I go into my filer snapshot directory and recover the file from the last day.

See for example NetApp filer.
There will be others too, that offer this option.

Volkmar
*** Say 'Thanks' with Kudos ***
Please use plain text.
Acclaimed Contributor
Dennis Handly
Posts: 24,962
Registered: ‎03-06-2006
Message 12 of 13 (391 Views)

Re: Why no recycle bin in UNIX

>Volkmar: use a file server who uses snapshots.

Yes, it's like magic. :-)
Don't have to bother IT anymore. I'm surprised they don't brag about it more.
Please use plain text.
Honored Contributor
Kapil Jha
Posts: 1,478
Registered: ‎01-23-2006
Message 13 of 13 (391 Views)

Re: Why no recycle bin in UNIX

Thanks for all the replies.
BR,
Kapil
I am in this small bowl, I wane see the real world......
Please use plain text.
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation