Timeline for Create a list of files in a directory with a certain char
Current License: CC BY-SA 3.0
8 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Apr 11, 2016 at 10:22 | vote | accept | Keith | ||
| Apr 8, 2016 at 18:02 | comment | added | don_crissti | ASevkin - why do you need the error prone ls | xargs when you can do it with find and do it right ? That is, if recursion is needed, otherwise you can simply glob - either way there's no point using ls. | |
| Apr 8, 2016 at 18:00 | comment | added | Stephen Kitt | Better yet, mkdir -p targetdir && mv ??t* targetdir... | |
| Apr 8, 2016 at 17:31 | comment | added | ASevkin | xargs is another option here; ls ??t* | xargs -I {} mv {} <target_directory> | |
| Apr 8, 2016 at 17:27 | comment | added | sborsky | add -mindepth 1 -maxdepth 1 to only find files in that one directory. | |
| Apr 8, 2016 at 17:21 | comment | added | don_crissti | This is better but searches recursively which (I think) is not what OP wants (though OP should clarify) and also lists directories. | |
| Apr 8, 2016 at 17:18 | review | First posts | |||
| Apr 8, 2016 at 18:02 | |||||
| Apr 8, 2016 at 17:16 | history | answered | ASevkin | CC BY-SA 3.0 |