Thanks so much harsh!!! I will study this and hit Enter after I understand it.
Thanks again, that's epic.
Yea that must be it! It's spitting out just the file name and not the whole path. There is only 1 level of depth, so I want to remove
- ./folder1/file 3
- ./folder1/file4
- ./folder2/file11
- ./folder2/file12
so how do I get the whole path into xargs? I tried xargs "$f"/
but fortunately that didn't work because it was trying to delete all the directories lmao XD
Oh I see, lol. Now I'm getting "Cannot remove: No such file or directory" all the way down! The files are there, I see them, they come up in the terminal, but for some reason xargs rm does not want to delete them. When I put the -f flag, rm doesn't give an error but the files are still there! wtf
Thank you for the tips, but now I'm getting "Cannot remove: No such file or directory" all the way down! The files are there, I see them, they come up in the terminal, but for some reason xargs rm does not want to delete them. When I put the -f flag, rm doesn't give an error but the files are still there! wtf
for f in *; do ls $f | tail -n 2 | xargs rm -rf; done
You mean like that? rm -rf followed by a question mark does not inspire confidence XD
As the title says, I just started with linux mint and am falling in love with bash scripts 😍 Actually I'm not sure if it's considered a script, but I want to delete the last 2 files in all subfolders in a folder. So far I've (after great effort) got the terminal to list the files, but I want to delete them. Here is how I get them listed:
for f in *; do ls $f | tail -n 2; done
All their names come satisfyingly up in the terminal. Now what? I tried adding | xargs rm but that didn't delete them. I also tried something with find command but that didn't work either. Some folders have 3 items, so I want to delete #2 and 3. Some folders have 15 items so I want to delete #14 and 15. Folders are arranged by name, so it's always the last 2 that I want to delete.
It's frustrating to be sooooo clooooose, but also very fun. Any help is appreciated!
Isn't PLO the government of Palestina?
These guys have only spoiled rich kid sore loser vibes. And cowards.
A flare up, perhaps
Hey thanks for the info. Are you saying that just standard LineageOS without gapps or MicroG will be unable to have a functioning OsmAnd (for example)? I remember a few years ago you had to install Mozilla location services seperately from F-Droid to get OsmAnd to work without Google stuff, but I've personally been out of the loop for a while.
Thanks for the info ❤️
Looks like you're right about that, thanks.
Thanks, and is there one DNS provider that is better than the others in terms of privacy and degoogling?
I have to update a phone that currently has LOS, and degoogle it at the same time. If I just upgrade to the latest version (by flashing) and not install mind the gapps, is it basically a degoogled phone? It seems that installing /e/ over the current LOS would require me to flash stock rom first, which takes more time. The current LOS version on the phone was just 1 or 2 iterations below the latest version, 20 or 21 I don't remember.
TIA