<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: rm question. .. in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/rm-question/m-p/2562968#M29533</link>
    <description>hi,&lt;BR /&gt;I take it even further than James' &amp;lt;&lt;ALIAS rm="rm -i"&gt;&amp;gt; :&lt;BR /&gt;I also add &amp;lt;&lt;ALIAS mv="mv -i"&gt;&amp;gt; and &amp;lt;&lt;ALIAS cp="cp -i"&gt;&amp;gt; for root and oracle.&lt;BR /&gt;I once had an Oracle consultant onsite; he wasn't too happy with pressing "Y" many times ;)  Anyhow, you can override the &amp;lt;&lt;RM -i=""&gt;&amp;gt; with &amp;lt;&lt;RM -f=""&gt;&amp;gt;.&lt;BR /&gt;regards,&lt;BR /&gt;Thiery.&lt;/RM&gt;&lt;/RM&gt;&lt;/ALIAS&gt;&lt;/ALIAS&gt;&lt;/ALIAS&gt;</description>
    <pubDate>Wed, 08 Aug 2001 04:35:28 GMT</pubDate>
    <dc:creator>Thierry Poels_1</dc:creator>
    <dc:date>2001-08-08T04:35:28Z</dc:date>
    <item>
      <title>rm question. ..</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/rm-question/m-p/2562963#M29528</link>
      <description>Someone that I work with did this command&lt;BR /&gt;rm ./* &lt;BR /&gt;Thinking it would delete all the scripts in a dir. But it deleted everything in the dir. Now they come over half scared to death. They thought it deleted everything in the root dir. It about scared me to death too. But how I see it they only deleted everything in that pwd dir and no where else. The way I see it the . means the current dir. the / would be the path to the dir and the * deleted everything in the dir. So in terms just another way of  doing&lt;BR /&gt;rm * Am I right?&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;Richard</description>
      <pubDate>Tue, 07 Aug 2001 21:28:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/rm-question/m-p/2562963#M29528</guid>
      <dc:creator>someone_4</dc:creator>
      <dc:date>2001-08-07T21:28:30Z</dc:date>
    </item>
    <item>
      <title>Re: rm question. ..</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/rm-question/m-p/2562964#M29529</link>
      <description>Hi Richard,&lt;BR /&gt;&lt;BR /&gt;Yes, you are right. But 'only' doing rm * or rm ./* could still be a killer command depending on the current working directory.&lt;BR /&gt;&lt;BR /&gt;Clay</description>
      <pubDate>Tue, 07 Aug 2001 21:34:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/rm-question/m-p/2562964#M29529</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2001-08-07T21:34:04Z</dc:date>
    </item>
    <item>
      <title>Re: rm question. ..</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/rm-question/m-p/2562965#M29530</link>
      <description>It was a home/usr/test dir.&lt;BR /&gt;&lt;BR /&gt;So it didnt delete any important files.&lt;BR /&gt;&lt;BR /&gt;Thanks My CLay&lt;BR /&gt;&lt;BR /&gt;Richard</description>
      <pubDate>Tue, 07 Aug 2001 21:36:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/rm-question/m-p/2562965#M29530</guid>
      <dc:creator>someone_4</dc:creator>
      <dc:date>2001-08-07T21:36:00Z</dc:date>
    </item>
    <item>
      <title>Re: rm question. ..</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/rm-question/m-p/2562966#M29531</link>
      <description>Oppps i mean Mr. Clay&lt;BR /&gt;&lt;BR /&gt;Richard</description>
      <pubDate>Tue, 07 Aug 2001 21:37:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/rm-question/m-p/2562966#M29531</guid>
      <dc:creator>someone_4</dc:creator>
      <dc:date>2001-08-07T21:37:28Z</dc:date>
    </item>
    <item>
      <title>Re: rm question. ..</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/rm-question/m-p/2562967#M29532</link>
      <description>Hi Richard:&lt;BR /&gt;&lt;BR /&gt;I'd provide some protection.  Create an alias for 'rm in the $HOME/.profile:&lt;BR /&gt;&lt;BR /&gt;# alias rm='rm -i'&lt;BR /&gt;&lt;BR /&gt;This way (at least) you are prompted to reply "y" or "n" before the file will be removed.  Don't worry (or maybe, do): when executed in a script, the alias doesn't apply.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Tue, 07 Aug 2001 23:10:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/rm-question/m-p/2562967#M29532</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2001-08-07T23:10:23Z</dc:date>
    </item>
    <item>
      <title>Re: rm question. ..</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/rm-question/m-p/2562968#M29533</link>
      <description>hi,&lt;BR /&gt;I take it even further than James' &amp;lt;&lt;ALIAS rm="rm -i"&gt;&amp;gt; :&lt;BR /&gt;I also add &amp;lt;&lt;ALIAS mv="mv -i"&gt;&amp;gt; and &amp;lt;&lt;ALIAS cp="cp -i"&gt;&amp;gt; for root and oracle.&lt;BR /&gt;I once had an Oracle consultant onsite; he wasn't too happy with pressing "Y" many times ;)  Anyhow, you can override the &amp;lt;&lt;RM -i=""&gt;&amp;gt; with &amp;lt;&lt;RM -f=""&gt;&amp;gt;.&lt;BR /&gt;regards,&lt;BR /&gt;Thiery.&lt;/RM&gt;&lt;/RM&gt;&lt;/ALIAS&gt;&lt;/ALIAS&gt;&lt;/ALIAS&gt;</description>
      <pubDate>Wed, 08 Aug 2001 04:35:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/rm-question/m-p/2562968#M29533</guid>
      <dc:creator>Thierry Poels_1</dc:creator>
      <dc:date>2001-08-08T04:35:28Z</dc:date>
    </item>
    <item>
      <title>Re: rm question. ..</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/rm-question/m-p/2562969#M29534</link>
      <description>Hi Richard,&lt;BR /&gt;&lt;BR /&gt;unix command needing a path ( as an argument ) to apply it's functions, behave like the following :&lt;BR /&gt;&lt;BR /&gt;1. if first character in path is "/" then it applis the function using absolute path ( from / and down ).&lt;BR /&gt;&lt;BR /&gt;2. if first character in path is not "/" then it applis the function using relative path ( from current and ... ).&lt;BR /&gt;&lt;BR /&gt;3. You have to realy be careful using rm command.&lt;BR /&gt;&lt;BR /&gt;I would recommand setting permessions on all filesystems to denny any unalerted rm commands from users. daily backups ( of curse Ignite Tapes ) could be highly appreciated in some circonstences.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;The alias way given by James is good one ( but not against scripts ).&lt;BR /&gt;&lt;BR /&gt;Magdi&lt;BR /&gt;Magdi&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 08 Aug 2001 16:23:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/rm-question/m-p/2562969#M29534</guid>
      <dc:creator>Magdi KAMAL</dc:creator>
      <dc:date>2001-08-08T16:23:40Z</dc:date>
    </item>
    <item>
      <title>Re: rm question. ..</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/rm-question/m-p/2562970#M29535</link>
      <description>A simplier way was suggested in Unix GURU:  Protect files in sensitive directories by &lt;BR /&gt;touching a file "-i" by typing "touch -- -i" in the concerned directory.  Then any command using a "*" will see the "-i" in the file list and interpret it as an option.  For example &lt;BR /&gt;rm * becomes rm -i file1 file2 file3 . . .</description>
      <pubDate>Wed, 08 Aug 2001 16:34:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/rm-question/m-p/2562970#M29535</guid>
      <dc:creator>Philip P. Hartl</dc:creator>
      <dc:date>2001-08-08T16:34:40Z</dc:date>
    </item>
    <item>
      <title>Re: rm question. ..</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/rm-question/m-p/2562971#M29536</link>
      <description>Hi Richard:&lt;BR /&gt;&lt;BR /&gt;I do the same as Thierry.  In fact, I have interactive aliases for 'rm', 'rmdir', 'mv' and 'cp'.&lt;BR /&gt;&lt;BR /&gt;With 'cp' I add '-p' since I generally want to preserve permissions and timestamps.&lt;BR /&gt;&lt;BR /&gt;If the aliases get in your way, you can issue:&lt;BR /&gt;&lt;BR /&gt;# unalias the_alias&lt;BR /&gt;&lt;BR /&gt;Then the default is restored until either you define the alias or logout and login again.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Wed, 08 Aug 2001 21:04:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/rm-question/m-p/2562971#M29536</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2001-08-08T21:04:53Z</dc:date>
    </item>
    <item>
      <title>Re: rm question. ..</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/rm-question/m-p/2562972#M29537</link>
      <description>Thoose are some good ideas I will have to implement something. Because that was just too close to rm /* &lt;BR /&gt;&lt;BR /&gt;Richard</description>
      <pubDate>Wed, 08 Aug 2001 21:10:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/rm-question/m-p/2562972#M29537</guid>
      <dc:creator>someone_4</dc:creator>
      <dc:date>2001-08-08T21:10:44Z</dc:date>
    </item>
    <item>
      <title>Re: rm question. ..</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/rm-question/m-p/2562973#M29538</link>
      <description>And one last comment: root's $HOME directory must be moved ASAP on all Unix machines if it is the / directory.  Yes, HP ships it that way but no one rememebers why or has a any reason to keep it there.&lt;BR /&gt;&lt;BR /&gt;On the other hand, everyone fears (or should fear) the rm -r * command.  Consider this scenario for root (and DON'T do it!):&lt;BR /&gt;&lt;BR /&gt;cd $HOME&lt;BR /&gt;cd /temp&lt;BR /&gt;rm -r *&lt;BR /&gt;&lt;BR /&gt;The hapless sysadmin has made a very big mistake and has destroyed the entire system. All files will be removed.  The problem is that there is a spelling error: /temp is not the same as /tmp and the sysadmin missed the small error message: sh: /temp:  not found.&lt;BR /&gt;&lt;BR /&gt;So no change was made and the rm command is now operating on the current directory ($HOME) which if not changed is: /&lt;BR /&gt;&lt;BR /&gt;Suggestions: mkdir /root or mkdir /home/root. The /root directory stays with the root filesystem whereas /home/root moves to another mountpoint. Remember that root often leaves droppings (like bird droppings?) and can accidently fill / which is not good.&lt;BR /&gt;&lt;BR /&gt;One other vote for the alias fixups (alias rm="/usr/bin/rm -i") involves another accident:&lt;BR /&gt;&lt;BR /&gt;cd /home/billh&lt;BR /&gt;rm -r *&lt;BR /&gt;rm -r .*&lt;BR /&gt;&lt;BR /&gt;Oops, although .* will remove those pesky 'hidden' files that start with . like .profile), the shell expands .* to also match .. and that's bad.  The command will now remove the parent directory (/home) recursively.  As many sysamins know, .* (that's dot star) matches things you aren't expecting.&lt;BR /&gt;&lt;BR /&gt;Hint: to remove all dot-files (there's always several ways):&lt;BR /&gt;&lt;BR /&gt;rm .??*   (won't remove files like .a or .aa)&lt;BR /&gt;&lt;BR /&gt;rm .[!.]* (works for all dot files)&lt;BR /&gt;</description>
      <pubDate>Thu, 09 Aug 2001 01:49:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/rm-question/m-p/2562973#M29538</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2001-08-09T01:49:18Z</dc:date>
    </item>
    <item>
      <title>Re: rm question. ..</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/rm-question/m-p/2562974#M29539</link>
      <description>I did a rm of a 1G file but bdf still shows the filesystem above 91%. How/When will I see the filesystem space drop.&lt;BR /&gt;</description>
      <pubDate>Thu, 20 Dec 2001 14:14:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/rm-question/m-p/2562974#M29539</guid>
      <dc:creator>Ed Klemm</dc:creator>
      <dc:date>2001-12-20T14:14:39Z</dc:date>
    </item>
    <item>
      <title>Re: rm question. ..</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/rm-question/m-p/2562975#M29540</link>
      <description>If that file is still open by a process, the space cannot be freed.</description>
      <pubDate>Thu, 20 Dec 2001 14:58:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/rm-question/m-p/2562975#M29540</guid>
      <dc:creator>John Bolene</dc:creator>
      <dc:date>2001-12-20T14:58:03Z</dc:date>
    </item>
    <item>
      <title>Re: rm question. ..</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/rm-question/m-p/2562976#M29541</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;rm ./* is a piece of cake :)&lt;BR /&gt;&lt;BR /&gt;One of my users, that had the root pass on its workstation, tried a rm -rf .* to remove the dotfiles. Well, he had a little surprised when he was 'warned' by rm that it cannot remove /dev/&lt;SOMETHING&gt; and hitted ctrl-c. Well, /bin was long gone.&lt;BR /&gt;&lt;BR /&gt;E.&lt;/SOMETHING&gt;</description>
      <pubDate>Fri, 21 Dec 2001 08:35:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/rm-question/m-p/2562976#M29541</guid>
      <dc:creator>Eugen Cocalea</dc:creator>
      <dc:date>2001-12-21T08:35:49Z</dc:date>
    </item>
  </channel>
</rss>

