Ls -p /Public/Downloads | grep -v "Cache/" | grep -v "Temp/" | grep -v "Completed/" | grep -v 'log.txt' | grep -v 'folder.jpg' >/Public/Downloads/Completed/temp.txtĬat /Public/Downloads/Completed/temp.txt |\ So i've changed my strategy for a loop anycodings_find using a temporary text file: #!/bin/bash I've searched a solution by myself but anycodings_grep haven't find something for my needs anycodings_grep combining find, grep and xargs for files and anycodings_grep directories. This works for downloaded files and folders anycodings_grep named without special characters: they are anycodings_grep moved to /Public/Downloads/Completedīut anycodings_grep when there is a or an ÃÂ anycodings_grep or something else special, xarg is anycodings_grep complaining unmatched single quote by anycodings_grep default quotes are special to xargs unless anycodings_grep you use the -0 option I tried this command: find /Public/Downloads/* -maxdepth 1 | grep -v Completed | grep -v Cache | grep -v Temp | grep -v log.txt | grep -v folder.jpg | xargs -i mv /Public/Downloads/Completed My directory anycodings_grep /Public/Downloads contains also two files anycodings_grep and three directories that must not be anycodings_grep moved. I made a script executed by filezilla when anycodings_grep download queue is finished, so all my anycodings_grep downloads are moved to anycodings_grep /Public/Downloads/Completed. I usually download with filezilla in the anycodings_grep directory /Public/Downloads on my nas.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |