Finding all directories with Gigabyte space usage. Extracting the directory name from xargs and then again xargs to remove them.
du -d2 -h ~/Downloads/ | grep -E '[0-9]G' | xargs -I{} sh -c "echo {} | cut -d' ' -f2" | xargs rm -ri
I would like to interactively remove the directory, but I dont get a chance from the bash to enter my option.