Quantcast
Channel: Remove all files except some from a directory - Stack Overflow
Viewing all articles
Browse latest Browse all 21

Answer by Epscillon Rules for Remove all files except some from a directory

$
0
0

The answer I was looking for was to run script, but I wanted to avoid deleting the sript itself. So incase someone is looking for a similar answer, do the following.

Create a .sh file and write the following code:

    cp my_run_build.sh ../../     rm -rf * cp      ../../my_run_build.sh .     /*amend rest of the script*/

Viewing all articles
Browse latest Browse all 21

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>