Solaris - /usr/bin/rm file


 
Thread Tools Search this Thread
Operating Systems Solaris Solaris - /usr/bin/rm file
# 1  
Old 08-25-2010
Solaris - /usr/bin/rm file

Hi ,

Can anyone tel me how to read the content of /usr/bin/rm file and pls tell me is it possible to edit that file???
# 2  
Old 08-25-2010
Hi.

The file is a binary.:

Code:
# file /usr/bin/rm
/usr/bin/rm:    ELF 32-bit MSB executable SPARC Version 1, dynamically linked, stripped

It would not be a good idea to edit it!

Code:
# strings /usr/bin/rm
SUNW_OST_OSCMD
frRi
usage: rm [-fiRr] file ...
getrlimit
rm of %s is not allowed
rm: %s is a directory
rm: remove %s (%s/%s)?
rm: %s: override protection %o (%s/%s)?
rm: %s not removed:
rm: examine files in directory %s (%s/%s)?
rm: cannot read directory %s:
rm: Insufficient memory.
%s/%s
rm: cannot read directory %s:
rm: cannot change to parent of directory %s:
rm: Cannot remove any directory in the path of the current working directory
rm: remove %s: (%s/%s)?
rm: Unable to remove directory %s:
rm: cannot determine if this is an ancestor of the current working directory
rm: Insufficient memory.
rm: Insufficient memory.
%s/%s
rm: strdup:
rm: cannot change to %s directory:
rm: cannot change to starting directory:
rm: cannot open starting directory:
rm: cannot stat current directory:
rm: Insufficient memory.

# 3  
Old 08-25-2010
Hi,

thanks for immediat response... i too got that but not able to understand wat it says.. Smilie if possible pls explain it.
# 4  
Old 08-25-2010
Hi.

Which bit don't you understand, why do you need to understand it, or care about it?

Code:
/usr/bin/rm:    ELF 32-bit MSB executable SPARC Version 1, dynamically linked, stripped

# 5  
Old 08-25-2010
I'm planning to make a recyclebin (to recover deleted files using fssnap, since im planning to do project on this for ma PG) i don know hw to proceed further. that script is very different and i'm new to Solaris, Having less experience. help me out.....
# 6  
Old 08-26-2010
rm is a system command, you can't edit it, you should not try and edit it.

what you want to do is replace it with a new command that copies the file to a special "recycle bin" folder.

so...

recycle.sh:
Code:
#!/bin/sh
cp -p $1 /recycle/.

then we use an alias:
Code:
alias rm recycle.sh

the above is NOT a full solution, it is only a guide.
# 7  
Old 08-26-2010
thanks...Smilie i wil get back shortly with more doubts..
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. BSD

FreeBSD: /usr/bin/ld not looking in /usr/local/lib

I'm not sure if this is the default behavior for the ld command, but it does not seem to be looking in /usr/local/lib for shared libraries. I was trying to compile the latest version of Kanatest from svn. The autorgen.sh script seems to exit without too much trouble: $ ./autogen.sh checking... (2 Replies)
Discussion started by: AntumDeluge
2 Replies

2. Solaris

What is the difference between xpg4/bin and usr/bin?

Hi Experts, I found that the same commands(sort, du, df, find, grep etc.) exists in both dir. What is the difference to use them? i.e: to use xpg4/bin/grep and usr/bin/grep My OS version is SunOS 5.10 Regards, Saps (7 Replies)
Discussion started by: saps19
7 Replies

3. OS X (Apple)

When to use /Users/m/bin instead of /usr/local/bin (& whats the diff?)?

Q1. I understand that /usr/local/bin means I can install/uninstall stuff in here and have any chance of messing up my original system files or effecting any other users. I created this directory myself. But what about the directory I didn't create, namely /Users/m/bin? How is that directory... (1 Reply)
Discussion started by: michellepace
1 Replies

4. UNIX for Dummies Questions & Answers

Alias /usr/bin to /bin in profile

Hi! All the basic linux commands, ie. echo, find, etc, are located in /bin. I have a couple of programs that have these commands pointed towards /usr/bin, ie, /usr/bin/echo (even though the actual 'echo' command is in /bin). How can I alias or redirect or link the /usr/bin to /bin just for this... (6 Replies)
Discussion started by: dancerat
6 Replies

5. UNIX for Advanced & Expert Users

#!/usr/bin/env : perl no such file or directory

hi i have some perl scripts with shebang line as (#! /usr/bin/env perl ) instead of actual absolute path of perl ( i know why its that way ) everything works fine from command line , the problem is when i am trying to run those scripts from web ( local web tool ) it throws error as /usr/bin/env :... (6 Replies)
Discussion started by: zedex
6 Replies

6. Solaris

How do I link ld in /usr/ucb/ to /usr/ccs/bin?

Hi all, below is the problem details: ora10g@CNORACLE1>which ld /usr/ucb/ld ora10g@CNORACLE1>cd /usr/ccs/bin ora10g@CNORACLE1>ln -s /usr/ucb/ld ld ln: cannot create ld: File exists ora10g@CNORACLE1> how to link it to /usr/ccs/bin? (6 Replies)
Discussion started by: SmartAntz
6 Replies

7. Solaris

/usr/bin/cut not working with largefiles on Solaris 10

I have a person running a perl script that is parsing > 2G log files and pipes to cut -d " " -f 1,6,7,8... The script itself is in a nfs mounted home directory. It runs fine when started from a solaris 8 box but fails after about 400 lines when started from the solaris 10 box. The solaris... (1 Reply)
Discussion started by: wottie
1 Replies

8. UNIX for Dummies Questions & Answers

Difference between /bin, /usr/bin, /sbin ?

Hi All, Can somebody tell me the difference between /bin, /usr/bin, /sbin ? Thanx in advance, Saneesh Joseph (3 Replies)
Discussion started by: saneeshjose
3 Replies

9. UNIX for Dummies Questions & Answers

/bin/sh: /usr/bin/vi: No such file or directory when doing crontab

I just set up an ftp server with Red Hat 5.2. I am doing the work, I'm baby stepping, but it seems like every step I get stuck. Currently, I'm trying to set up a crontab job, but I'm getting the following message: /bin/sh: /usr/bin/vi: No such file or directory. I see that vi exists in /bin/vi,... (3 Replies)
Discussion started by: kwalter
3 Replies
Login or Register to Ask a Question