12-19-2007
rm command not able to remove file
I have directory IXNPG7 under which i have seen file ads[1].c , ads[1].gif ,
ads[1].js and lots more with extension .html
I tried to remove the Entire Directory with rm -Rf IXNPG7
but it is saying -- Directory Not empty can't remove
Secondly i tried removing all the files first
using rm *.* inside that directory all files get removed except ads[1].c
i tried to remove using rm -fr ads[1].c --after issuing the command the
rm is silent with out any error,but not able to delete this file ?
1 -- Can you please tell me why the directory is not removed recursively
2-- Why this FILE is not removing ?
3- Some time this directory contains a file whose name more then 1 line of characters and denied removing saying too long file name ?
Please tell me what could be the reason ?
Thanks
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi,
First time on the forum. I have converted some files using the Unix to DOS command but need to strip off the last record that is generated from this conversion that contains just a ^Z. Is there any command that would accomplish this without having to do stream editing? (4 Replies)
Discussion started by: mheinen
4 Replies
2. Shell Programming and Scripting
Hello,
Can anyone tell Command/Script to remove duplicate lines from the file? (2 Replies)
Discussion started by: Rahulpict
2 Replies
3. Shell Programming and Scripting
Hi all...
I want to delete the entire text of the file and want to make it zero byte..
would you please tell me the command for it.
Thanks and regards
Vijay sahu (4 Replies)
Discussion started by: vijays3
4 Replies
4. UNIX for Dummies Questions & Answers
I have a file from which the Header and the Trailer lines need to be removed. They are confirmed to be the first and the last lines in the file.
I have tried a few commands, but not successful yet. It needs to be implemented urgently, hence any help is greatly appreciated.
Raghu
----------... (1 Reply)
Discussion started by: ragz_82
1 Replies
5. Shell Programming and Scripting
Hello. I have the following issue: my txt file has the following format:
train/dr4/fklc0/sx175.txt 0 80282 Severe myopia contributed to Ron's inferiority complex. train/dr4/fklc0/sx355.txt 0 42906 Dolphins are intelligent marine mammals. train/dr4/fklc0/sa2.txt
With the... (1 Reply)
Discussion started by: li_bi
1 Replies
6. Shell Programming and Scripting
Hi
I have a file with fields delimited by |. I need to remove the first field from the file. I tried cut but it just extracts that field.
sample.output
abc|100|name1
cde|200|name2
efg|300|name3
Output should be
sample.output
100|name1
200|name2
300|name3
thanks
Var (6 Replies)
Discussion started by: var285
6 Replies
7. UNIX for Dummies Questions & Answers
Hi,
I have catenated multiple output files (from a monte carlo run) into one big output file. Each individual file has it's own two line header. So when I catenate, there are multiple two line headers (of the same wording) within the big file. How do I use the sed command to search for the... (1 Reply)
Discussion started by: rebazon
1 Replies
8. Shell Programming and Scripting
Hi,
I writing a shell program to remove the data from output of the find which matches a list in a file
I am using the below find command to get the list of files
x=`find . -name test*.dat`
the output of the find command is as follows
test1.dat
test2.dat
test3.dat
test4.dat... (4 Replies)
Discussion started by: pals70423
4 Replies
9. Shell Programming and Scripting
I have two questions:
the first is I have a line of code:
printf "What is the id of the patient getting GJB2 analysis : "; read id that stores a user input in a variable $id in the python directory c:/Users/cmccabe/Desktop/Python27/$id.txt
Using rm I get the error cannot remove ... (21 Replies)
Discussion started by: cmccabe
21 Replies
10. UNIX for Beginners Questions & Answers
I have a eg file op.txt
This is a cat
This is a fat cat
This is a fat black cat
I want to remove only the word cat from the first alone .can somebody help.
please do wrap your samples in CODE TAGS
As per forum rules. (7 Replies)
Discussion started by: Sharks
7 Replies
LEARN ABOUT SUSE
nisrmdir
nisrmdir(1) User Commands nisrmdir(1)
NAME
nisrmdir - remove NIS+ directories
SYNOPSIS
nisrmdir [-if] [-s hostname] dirname
DESCRIPTION
nisrmdir deletes existing NIS+ subdirectories. It can remove a directory outright, or simply remove replicas from serving a directory.
This command modifies the object that describes the directory dirname, and then notifies each replica to remove the directory named
dirname. If the notification of any of the affected replicas fails, the directory object is returned to its original state unless the -f
option is present.
This command will fail if the NIS+ master server is not running.
OPTIONS
The following options are supported:
-i Interactive mode. Like the system rm(1) command the nisrmdir command will ask for confirmation prior to removing a direc-
tory. If the name specified by dirname is a non-fully qualified name this option is forced on. This prevents the removal of
unexpected directories.
-f Force the command to succeed even though it may not be able to contact the affected replicas. This option should be used
when a replica is known to be down and will not be able to respond to the removal notification. When the replica is finally
rebooted it will read the updated directory object, note that it is no longer a replica for that directory, and stop
responding to lookups on that directory. Cleanup of the files that held the now removed directory can be accomplished manu-
ally by removing the appropriate files in the /var/nis directory. See nisfiles(4) for more information.
-s hostname Specify that the host hostname should be removed as a replica for the directory named dirname. If this option is not
present all replicas and the master server for a directory are removed and the directory is removed from the namespace.
Special per-server and per-directory access restrictions may apply when this command updates the serving lists of the affected NIS+
servers. For more information, see nisopaccess(1).
OPERANDS
The following operand is supported:
dirname An existing NIS+ directory.
EXAMPLES
Example 1: Using the nisrmdir Command
To remove a directory bar under the foo.com. domain, one would use the command:
example% nisrmdir bar.foo.com.
To remove a replica that is serving directory bar.foo.com. one would use the command:
example% nisrmdir -s replica.foo.com. bar.foo.com.
To force the removal of directory bar.foo.com. from the namespace, one would use the command:
example% nisrmdir -f bar.foo.com.
ENVIRONMENT VARIABLES
NIS_PATH If this variable is set, and the NIS+ directory name is not fully qualified, each directory specified will be searched
until the directory is found. See nisdefaults(1).
EXIT STATUS
The following exit values are returned:
0 Successful operation.
1 Operation failed.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWnisu |
+-----------------------------+-----------------------------+
SEE ALSO
nis+(1), nisdefaults(1), nisopaccess(1),nisrm(1), nisfiles(4), attributes(5)
NOTES
NIS+ might not be supported in future releases of the SolarisTM Operating Environment. Tools to aid the migration from NIS+ to LDAP are
available in the Solaris 9 operating environment. For more information, visit http://www.sun.com/directory/nisplus/transition.html.
SunOS 5.10 10 Dec 2001 nisrmdir(1)