32
submitted 1 day ago* (last edited 1 day ago) by joeldebruijn@lemmy.ml to c/linux@lemmy.ml

Background:

I think I messed up ... Wanted to get a lot of files out of a nested folderstructure 3 levels deep and used mv /*/*/* ./ somewhere deep in my personal folders. I got a lot of errors and quick as I could stopped it. Now that folder is is messed up with a lot of stuff (see below) which I dont know the origin of. The good news: I have fairly recent backups

Questions:

  • Could they be from subdirectories in my home folder?
  • Could they be from subdirectories outside my home folder? Especially grubenv caught my eye.
  • Could it be potentially dangerous to reboot? I leave my PC on untill I know more.
  • Would it be possible to reverse the moving in some way, to put them back where they belong, even manually?

Any help greatly appreciated.

Files:

Sorry for the long list

0 1 10 10:1 10:125 10:126 10:127 10:130 10:183 10:224 10:228 10:229 10:231 ... 116:8 116:9 ... 13:81 ... 8 81:0 81:1 81:2 81:3 9 arch_status attr autogroup by-diskseq by-id by-label by-partlabel by-partuuid by-path by-uuid cgroup cmdline comm coredump_filter cpu_resctrl_groups cpuset fd fdinfo fonts gid_map grubenv limits list.txt locale loginuid map_files maps mountinfo mounts net ns numa_maps nvme0n1p8_crypt oom_adj oom_score oom_score_adj projid_map sched schedstat sessionid setgroups smaps smaps_rollup stat statm status task timens_offsets timers timerslack_ns uid_map unicode.pf2 usb wchan x86_64-efi

you are viewing a single comment's thread
view the rest of the comments
[-] merthyr1831@lemmy.ml 7 points 1 day ago

I'd probably do a clean install (eventually) even if it looked like stuff works for now.

I know the pain, though. did rm -rf in the wrong directory and wiped half my drive in seconds. Good times.

[-] thingsiplay@beehaw.org 1 points 11 hours ago

Classic. I also did the rm -rf once in a wrong directory of a programming project. Luckily it was a subdirectory, so nothing important lost. But it could have easily if I was one hierarchy higher.

I am so much afraid of rm -rf, that I usually go in a directory with cd and rm in current directory those files only. And then I do rmdir on empty directories. I use recursive -r only, with specific directory names included (autocomplete helps). This way, even if I am in the wrong directory, the chance that there is the exact same directory name is a bit lower.

And I often also just switch to graphical filemanager to delete files. Not only that. Sometimes I also just move folder instead deleting, so I have a back up until I'm sure. There is also trash-cli.

[-] phantomwise@lemmy.ml 1 points 20 hours ago
this post was submitted on 07 Jun 2025
32 points (100.0% liked)

Linux

54955 readers
520 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 6 years ago
MODERATORS