Sponsored Content
Full Discussion: How do I remove commands?
Top Forums UNIX for Dummies Questions & Answers How do I remove commands? Post 302459608 by pinga123 on Tuesday 5th of October 2010 05:16:57 AM
Old 10-05-2010
From above methods i have noted down some methods of removing the command but i m yet confused which method should i follow.

As i m using it for my blog i have written it considering my blog in mind please help me evaluating the best one considering it wont affect other functionality.

It is highly recommended to remove following command on production server .
There are several ways of not using the command choose one that is suitable for your need.

Method 1:

Just try to find the rpm for the above command.
This can be done using.

Code:
rpm -qa | grep -i rsh
rsh-0.17-38.el5
rpm -qa | grep -i rcp
rpm -qa | grep -i rlogin

As you can see only first command return any output.

We need to further see what command rsh-0.17-38.el5 contains.

This can be done using

Code:
# rpm -ql rsh-0.17-38.el5
/usr/bin/rcp
/usr/bin/rexec
/usr/bin/rlogin
/usr/bin/rsh
/usr/share/man/man1/rcp.1.gz
/usr/share/man/man1/rexec.1.gz
/usr/share/man/man1/rlogin.1.gz
/usr/share/man/man1/rsh.1.gz


From the output you can assume that by uninstalling the rpm you can achieve the removal of those command from production server.


Method 2:

Change the file permisisons:

(First check the location of command using which command name.Below examples are given considering the commands are located under /usr/bin/rcp This could be different for different Linux Distributions.)
Code:
chmod 000 /usr/bin/rcp

chmod 000 /usr/bin/rsh

chmod 000 /usr/bin/rlogin

Method 3:

just remove execute bit of the command using.


(First check the location of command using which command name.Below examples are given considering the commands are located under /usr/bin/rcp This could be different for different Linux Distributions.)


Code:
chmod -x /usr/bin/rcp

chmod -x /usr/bin/rsh

chmod -x /usr/bin/rlogin

Method 4:

Remove the command itself using.

Code:
rm -rf `which rcp`
rpm -rf `which rlogin`
rpm -rf `which rsh`


Last edited by pinga123; 10-05-2010 at 06:34 AM..
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

smitty, remove user, remove directory as well..

hi, i am on aix. i used smitty to remove a user.. but then found that its directory still exists.... so i have to remove the directory manually... am i doing it the right way? (2 Replies)
Discussion started by: yls177
2 Replies

2. UNIX for Advanced & Expert Users

Remove Commands from Buffer

Hi.. When I execute a command, say for ex.. cp ../../* to ..../.../* and then when I use escape K, enter... it shows the commands recently executed. How can we remove that commands from buffer? This is a sun-solaris 8 environment.. Thanks, ST2000 (3 Replies)
Discussion started by: ST2000
3 Replies

3. Programming

code that reads commands from the standard i/p and executes the commands

Hello all, i've written a small piece of code that will read commands from standard input and executes the commands. Its working fine and is execting the commands well. Accepting arguments too. e.g #mkdir <name of the directory> The problem is that its not letting me change the directory i.e... (4 Replies)
Discussion started by: Phrozen Smoke
4 Replies

4. Shell Programming and Scripting

Can BASH execute commands on a remote server when the commands are embedded in shell

I want to log into a remote server transfer over a new config and then backup the existing config, replace with the new config. I am not sure if I can do this with BASH scripting. I have set up password less login by adding my public key to authorized_keys file, it works. I am a little... (1 Reply)
Discussion started by: bash_in_my_head
1 Replies

5. Shell Programming and Scripting

To remove date and duplicate rows from a log file using unix commands

Hi, I have a log file having size of 48mb. For such a large log file. I want to get the message in a particular format which includes only unique error and exception messages. The following things to be done : 1) To remove all the date and time from the log file 2) To remove all the... (1 Reply)
Discussion started by: Pank10
1 Replies

6. Shell Programming and Scripting

command to remove multiple commands in particular columns

Hi Experts, I actually need to remove multiple commas within the column not the entire row. Its comma delimited file Actually the value seems to look like 1,006,000, when we open this in notepad or word pad the value look s like “1,006,000” Actually our Sed command removes single comma and... (7 Replies)
Discussion started by: bshivali
7 Replies

7. AIX

HACMP: difference between 'cl' commands and 'cli' commands

Hi all, I'm new in this forum. I'm looking for the difference between the HACMP commands with the prefix "cl" and "cli". The first type are under /usr/es/sbin/cluster/sbin directory and the second are under /usr/es/sbin/cluster/cspoc directory. I know that the first are called HACMP for AIX... (0 Replies)
Discussion started by: peppix
0 Replies

8. Shell Programming and Scripting

remove brackets and put it in a column and remove repeated entry

Hi all, I want to remove the remove bracket sign ( ) and put in the separate column I also want to remove the repeated entry like in first row in below input (PA156) is repeated ESR1 (PA156) leflunomide (PA450192) (PA156) leflunomide (PA450192) CHST3 (PA26503) docetaxel... (2 Replies)
Discussion started by: manigrover
2 Replies

9. Post Here to Contact Site Administrators and Moderators

Please remove this post/remove information from it

In this thread: /shell-programming-and-scripting/255687-organizing-text-file-capital-names-capital-word-capital-word.html (sorry i cant use links) that is not an example, those are real students names with real student login id's for the college i am attending and i am on that list. Please... (3 Replies)
Discussion started by: throwawayacc
3 Replies

10. UNIX for Beginners Questions & Answers

Bash to remove find and remove specific extension

The bash below executes and does find all the .bam files in each R_2019 folder. However set -x shows that the .bam extension only gets removed from one .bam file in each folder (appears to be the last in each). Why is it not removing the extension from each (this is $SAMPLE)? Thank you :). set... (4 Replies)
Discussion started by: cmccabe
4 Replies
adb(1)                                                             User Commands                                                            adb(1)

NAME
adb - general-purpose debugger SYNOPSIS
adb [-kw] [-I dir] [-P prompt] [-V mode] [ object [ core]] DESCRIPTION
The adb utility is an interactive, general-purpose debugger. It can be used to examine files and provides a controlled environment for the execution of programs. The adb utility is now implemented as a link to the mdb(1) utility in Solaris 9. mdb(1) is a low-level debugging utility that can be used to examine user processes as well as the live operating system or operating system crash dumps. The new mdb(1) utility provides complete backwards compatibility with the existing syntax and features of adb, including support for processing adb macro files. The Solaris Modular Debugger Guide and mdb(1) man page describes the features of mdb, including its adb compatibility mode. This mode will be activated by default when the adb link is executed. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWmdb | +-----------------------------+-----------------------------+ SEE ALSO
mdb(1), attributes(5) Solaris Modular Debugger Guide SunOS 5.10 19 Aug 2003 adb(1)
All times are GMT -4. The time now is 04:06 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy