![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Sed and awk backslash characters | potro | Shell Programming and Scripting | 7 | 05-19-2008 08:34 AM |
| How ro handle backslash character in grep? | rajbal | Shell Programming and Scripting | 1 | 06-18-2007 08:19 PM |
| ignoring backslash while executing command | agalkin | Shell Programming and Scripting | 6 | 11-16-2005 06:04 PM |
| backslash issues | Bab00shka | UNIX for Dummies Questions & Answers | 5 | 07-09-2004 08:53 AM |
| Adding a backslash to users' input | netguy | Shell Programming and Scripting | 13 | 04-30-2004 05:06 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Backslash in find command
When I run my script in debug mode I see that \ is not getting executed as part of command. It is being treated as escape character.
find ${DATABASE_PARAM_PATH} -mtime +${RETENTION_PERIOD} -exec rm -rf {} \; Command execution output in debug mode : find /pgmfgfpws/app/oracle/mfgfpwsdb/10.2.0/admin/mfgfpws_webisstg70/bdump -mtime +1 -exec ls -ltr {} ; Backslash is missing. Without blackslash if bdump directory is empty after deleting all files which meet deletion criterion, find command deletes bdump directory as well. I don't want bdump directory to be deleted even though it is empty. I have tried escaping backslash as below but it doesn't work : find ${DATABASE_PARAM_PATH} -mtime +${RETENTION_PERIOD} -exec rm -rf {} \\; Same command works fine when run from command line. Any help is greatly appreciated. |
|
||||
|
See find command Help!! where you asked the same question. Thanks.
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|