WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Accidentally deleted entire usr/lib (help)  (Read 1040 times)

Offline Ripley

  • Newbie
  • *
  • Posts: 17
Accidentally deleted entire usr/lib (help)
« on: June 22, 2022, 09:22:47 AM »
Haha, rip.

So I was trying to delete specific files from usr/lib with .la extention as suggested in another topic, and I was doing so with the "sudo rm filename.la". I wanted to speed up the process, so I did a google search and found that I could delete all files in my current directory that end in a specific extension. "sudo rm * .la" is what I typed, as seen on the internet... I'm quite positive I should have done more research before trusting something so major.

long story short, im sitting here with only "X11, gcc, gconv, micropython" and "pkgnconfig" left in my usr/lib folder. Is there a way to fix this? Im aware that tinycore boots of ram and i was hoping that maybe everything I've done to mess up would be fixed when rebooting... but don't think thats gonna work because these are librarys.

Any suggestions or do I need to do a new tinycore install from scratch?

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14516
Re: Accidentally deleted entire usr/lib (help)
« Reply #1 on: June 22, 2022, 09:26:07 AM »
Reboot - everything will be fine

Offline Ripley

  • Newbie
  • *
  • Posts: 17
Re: Accidentally deleted entire usr/lib (help)
« Reply #2 on: June 22, 2022, 09:38:19 AM »
Thank you so much, everything is normal.

I'm curious to how that works? how is it that I can delete librarys and have them return... is that because I'm in usr?

Also is there a way to do what I wanted to do, properly. Delete all files with a .la in the current directory? I don't trust looking that up right now

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14516
Re: Accidentally deleted entire usr/lib (help)
« Reply #3 on: June 22, 2022, 09:43:29 AM »
The libraries are contained in the initrd and extensions and copied/symlinked into /usr/lib and /usr/local/lib on boot or when loaded - you can read the tinycore book for a fuller explanation.

To remove the la files:
Code: [Select]
sudo rm /usr/lib/*.la
sudo rm /usr/local/lib/*.la

Offline Ripley

  • Newbie
  • *
  • Posts: 17
Re: Accidentally deleted entire usr/lib (help)
« Reply #4 on: June 22, 2022, 09:45:21 AM »
Thats a really cool way of doing things. Thank you so much for the help

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11178
Re: Accidentally deleted entire usr/lib (help)
« Reply #5 on: June 22, 2022, 01:01:14 PM »
Hi Ripley
... "sudo rm * .la" is what I typed, as seen on the internet...
If that is what you typed, you typed it wrong.

I've made this statement in some form on multiple occasions, but it bears repeating:
Hey, this is Linux, not high school. Spelling counts. Punctuation counts. Capitalization counts. Syntax counts.

You typed:
Code: [Select]
sudo rm * .laThat means first remove everything (*), then remove the hidden file called  la (.la).

The correct syntax:
Code: [Select]
sudo rm *.laThis means remove any file whose name ends in  .la