Timeline for Unable to assign values to array within -exec command of find result
Current License: CC BY-SA 4.0
11 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Sep 24, 2019 at 10:31 | answer | added | mirabilos | timeline score: 2 | |
| Sep 23, 2019 at 12:18 | vote | accept | Srinivasarao Kotipatruni | ||
| Sep 19, 2019 at 17:18 | history | edited | Freddy | CC BY-SA 4.0 | code formatting, added missing semicolon |
| Sep 19, 2019 at 17:11 | answer | added | Stéphane Chazelas | timeline score: 4 | |
| Sep 19, 2019 at 15:50 | answer | added | James Li | timeline score: 0 | |
| Sep 19, 2019 at 15:17 | comment | added | Srinivasarao Kotipatruni | Yes. And also, simillarly I am capturing directories before I delete them in another part of the code. why because if I delete files first, the mtime of the directory is chaning. So, in a similar way abvoe, I was capturing directories older than 7 days and then trying to delte files followed by directories. | |
| Sep 19, 2019 at 15:11 | comment | added | James Li | to confirm : you want the filenames before actually delete them ? | |
| Sep 19, 2019 at 15:08 | comment | added | Srinivasarao Kotipatruni | I was just trying to capture the files I am going to delete in the same shell. since I used ` ! -type d ` I am capturing the files older than +7 days. | |
| Sep 19, 2019 at 14:55 | comment | added | James Li | in fact i am not following the code int the find command, why is it necessary? find "$CDIR" ! -type d -mtime +7 print out every dir older than 7 days by default | |
| Sep 19, 2019 at 14:49 | comment | added | James Li | array values can not share across different sub-shell, the find -exec create a sub-shell where you assigned the value, it did not , and it can not pass to the outer shell | |
| Sep 19, 2019 at 14:14 | history | asked | Srinivasarao Kotipatruni | CC BY-SA 4.0 |