cp copy idea

16 views
Skip to first unread message

highs...@yahoo.de

unread,
Mar 26, 2021, 12:35:52 PM3/26/21
to LUG, Jeremiah Bess
hello again

is this an idea to copy  a*.txt?


find ./ -type f ! \( -iname "*.html" -o -iname "*.css" \) -delete

find ./ -type f ! -iname "*.txt" -delete


regards Sophie






Am 24.02.21 um 17:45 schrieb highs...@yahoo.de:
> good afternoon
>
> Sorry for asking again
>
> can sth like this help?
>
> |find . -name '*.txt' -exec rsync -R {} ~/alltxt/ \; Regards Sophie |
>
>

Robert Citek

unread,
Mar 26, 2021, 12:50:00 PM3/26/21
to linuxusersgroup
Do you have a sample set with which to try this?
Do you know what the expected results are from the operation you are
wanting to perform?
Do the commands below generate those expected results?

If so, can you share those with the group?

For example ...

$ touch foo.html foo.css foo.txt a-foo.txt

$ tree
.
├── a-foo.txt
├── foo.css
├── foo.html
└── foo.txt

0 directories, 4 files

$ find ./ -type f ! \( -iname "*.html" -o -iname "*.css" \) -print -delete
.//foo.txt
.//a-foo.txt

$ find ./ -type f ! -iname "*.txt" -print -delete
.//foo.html
.//foo.css

$ tree
.

0 directories, 0 files

Regards,
- Robert
> --
> --
> You received this message because you are subscribed to the Linux Users Group.
> To post a message, send email to linuxus...@googlegroups.com
> To unsubscribe, send email to linuxusersgro...@googlegroups.com
> For more options, visit our group at http://groups.google.com/group/linuxusersgroup
> References can be found at: http://goo.gl/anqri
> Please remember to abide by our list rules (http://tinyurl.com/LUG-Rules)
> ---
> You received this message because you are subscribed to the Google Groups "Linux Users Group" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to linuxusersgro...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/linuxusersgroup/e2e5ce0b-be69-dea2-0a1e-4afd9cf95e2b%40yahoo.de.

highs...@yahoo.de

unread,
Apr 1, 2021, 7:49:27 AM4/1/21
to linuxus...@googlegroups.com
Hello and thank You.

I ll print is out
and study it
and then we ll try it.


Im careful and will try it on an USB Stick.


Regards
Gappy Easter


Sophie





Am 26.03.21 um 17:49 schrieb Robert Citek:
Reply all
Reply to author
Forward
0 new messages