- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Problems with the command rm
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-17-2010 12:10 AM
тАО03-17-2010 12:10 AM
Problems with the command rm
user@server:~> alias | grep cle
alias cle='(cd ~/output/log; rm *; close_out all;)'
alias mqq='while [ 1 ]; do clear; mq; sleep 3; done;'
user@server:~/output/log> rm *
8583pos_int.out: 640 mode ? (y/n) n
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-17-2010 12:28 AM
тАО03-17-2010 12:28 AM
Re: Problems with the command rm
Horia.
Horia.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-17-2010 12:28 AM
тАО03-17-2010 12:28 AM
Re: Problems with the command rm
over here I suppose you are not the owner of the file or root??
BR,
Kapil+
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-17-2010 12:43 AM
тАО03-17-2010 12:43 AM
Re: Problems with the command rm
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-17-2010 12:52 AM
тАО03-17-2010 12:52 AM
Re: Problems with the command rm
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-17-2010 01:37 AM
тАО03-17-2010 01:37 AM
Re: Problems with the command rm
BR,
Kapil+
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-17-2010 01:39 AM
тАО03-17-2010 01:39 AM
Re: Problems with the command rm
rm -f * is probably the most dangerous command in any UNIX, worse than a reboot.
I have learned not to use * with rm :)
use it wisely, it really sucks sometimes.
BR,
Kapil+
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-17-2010 02:53 AM
тАО03-17-2010 02:53 AM
Re: Problems with the command rm
check the permission....
regards
MC
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-18-2010 09:49 AM
тАО03-18-2010 09:49 AM
Re: Problems with the command rm
Being anal, as any good admin should be about using rm, you're much better off creating an object list that you verify and edit then process through a simple command line that will rm the files. WAY more safe than just issuing rm at the command line with wild cards.
For example:
1. create the list by using ls and sending output to a file such as /tmp/flist1
> ls -1 >/tmp/flist1
2. edit the list to be sure only files you want deleted are in the file
> vi /tmp/flist1
3. run a command to process the list
> cat /tmp/flist1|xargs -i rm -f {}
The above command will rm the object {} which gets sent to the {} by xargs processing each line of the file /tmp/flist1
BEST way, IMHO. Also, you can then cp the file to /tmp/flist2, chop all but the first 5 lines and run the above as a test to see if it works.
-RCP