Thursday 23 August 2012

how to delete files in UNIX which contains special characters like " , ( , ',)

Objective: If the file in Unix contains special characters in its name, then a simple "rm" command will not work, so what is the solution!

  Cook Book:

 We can use the escape character "\" to remove such files. 

Following is an example


[oracle@TESTServer]>ls -ltrh
total 129

-rw-r--r--   1 oracle   oinstall       0 Aug 21 14:54 to_date('22-FEB-2012')"
-rw-------   1 oracle   oinstall     723 Aug 21 14:55 nohup.out

[oracle@TESTServer]>rm to_date\(\'22-FEB-2012\'\)\"


[oracle@TESTServer]>ls -ltrh
total 110
-rw-------   1 oracle   oinstall     723 Aug 21 14:55 nohup.out

No comments:

 Oracle Weblogic 12.2.1.3.0 60820: Select a domain which is a compatible with this environment. stopComponent.sh and start Component.sh give...