in Education by
The following script I have saved in an .sh file on the server that clears a few directories of old files and directories. #!/bin/bash find /PATH_TO_DIRECTORY_1 -mtime +5 -type f -delete find /PATH_TO_DIRECTORY_2 -mtime +5 -type f -delete find /PATH_TO_DIRECTORY_3 -mtime +5 -type d -exec rm -rv {} + This is the error message when I run the script: 'ind: unknown predicate `-delete In addition to $'\r': command not found I don't think the latter disturbs the code but the first one surely does. Mind that I edit my code on Windows 10 and my server is an Ubuntu 64x run through Amazon Web Services (EC2). JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
by
I encountered the same issue. The problem was that my file was in dos format. Using the command dos2unix on my file, solve the problem.

Related questions

0 votes
    Suppose I have a bunch of "homegeneous" sc-files, and I need to execute one specific sequence of ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 14, 2022 in Education by JackTerrance
0 votes
    I have a parameters.ini file, such as: [parameters.ini] database_user = user database_version = 20110611142248 I want to ... I do this? Select the correct answer from above options...
asked Feb 8, 2022 in Education by JackTerrance
0 votes
    Within a python script can I call an external command? Select the correct answer from above options...
asked Jan 22, 2022 in Education by JackTerrance
0 votes
    The predicate in a where clause can involve Boolean operations such as and. The result of true and ... , Database Interview Questions and Answers for Freshers and Experience...
asked Oct 11, 2021 in Education by JackTerrance
0 votes
    I'm trying to generate an 837P EDI file using EDIDev. I was able to generate 4 other 837P files ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 19, 2022 in Education by JackTerrance
0 votes
    A voltmeter has a sensitivity of 1000 Ω/V reads 200 V on its 300 V scale. When connected across an unknown ... for GATE EC Exam, Network Theory MCQ (Multiple Choice Questions)...
asked Oct 12, 2021 in Education by JackTerrance
0 votes
    For a given predicate pred : 'a list -> bool and generator gen : Gen...
asked May 19, 2022 in Education by JackTerrance
0 votes
    I have 2 Tables, Receipts which contains columns like Id, InvoiceId etc and Invoices, which Contains Id, ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 10, 2022 in Education by JackTerrance
0 votes
    I have 2 Tables, Receipts which contains columns like Id, InvoiceId etc and Invoices, which Contains Id, ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 7, 2022 in Education by JackTerrance
0 votes
    sentence contains or implies a predicate and a subject. Myth Fact Select the correct answer from above options...
asked Dec 25, 2021 in Education by JackTerrance
0 votes
    The ______ clause allows us to select only those rows in the result relation of the ____ clause that ... , Database Interview Questions and Answers for Freshers and Experience...
asked Oct 11, 2021 in Education by JackTerrance
0 votes
    _______________ allows a system administrator to associate a function with a relation; the function returns a ... Interview Questions and Answers for Freshers and Experience...
asked Oct 11, 2021 in Education by JackTerrance
0 votes
    What is the purpose of Predicate functional interface in Java8?...
asked Nov 8, 2020 in Education by Editorial Staff
0 votes
    How to delete unpublished Git commits and get rid of them permanently? A. git reset –hard B. git revert C. git reset –soft...
asked Dec 20, 2022 in Technology by JackTerrance
0 votes
    Is it possible to send payload in the GET and DELETE methods?...
asked Jun 23, 2021 in Technology by JackTerrance
...