Ohm Posted August 17, 2014 Posted August 17, 2014 This morning I tried to purge the sd data from captured pcap data with the rm -r command. When I tried to 'ls' at the root directory it wasn't there anymore. So my question is, were there any important hidden files i should have known about? And I guess I have to make a directory and mount the SD card back, eh? Quote
fringes Posted August 17, 2014 Posted August 17, 2014 To generically remove all PCAP in a particular directory tree (such as /sd), use something like: find /sd -name "*.pcap" -exec rm {} \; But even that ay not be what you want, so be careful. You really didn't provide enough information. What directory were you in and exactly what did you type? Perhaps something like?: cd /sd rm -r * Or even perhaps: rm -r /sd That is seldom a good idea. But with the Mk5, it's always easy to start over. I would start with a reboot. Then SSH in and type "mount". Do you see a line like the following? /dev/sdcard/sd1 on /sd type ext4 (rw,relatime,user_xattr,barrier=1,data=ordered) What do you see if you type: ls -la /sd If you get the error "No such file or directory", then type: mkdir /sd and reboot. Quote
Ohm Posted August 17, 2014 Author Posted August 17, 2014 You really didn't provide enough information. What directory were you in and exactly what did you type? Perhaps something like?: cd /sd rm -r * Or even perhaps: rm -r /sd I saw in the /sd directory and performed a rm -r * I would start with a reboot. Then SSH in and type "mount". Do you see a line like the following? /dev/sdcard/sd1 on /sd type ext4 (rw,relatime,user_xattr,barrier=1,data=ordered) Nope. rootfs on / type rootfs (rw) /dev/root on /rom type squashfs (ro,relatime) proc on /proc type proc (rw,noatime) sysfs on /sys type sysfs (rw,noatime) tmpfs on /tmp type tmpfs (rw,nosuid,nodev,noatime,size=30904k) tmpfs on /dev type tmpfs (rw,noatime,size=512k,mode=755) devpts on /dev/pts type devpts (rw,noatime,mode=600) /dev/mtdblock3 on /overlay type jffs2 (rw,noatime) overlayfs:/overlay on / type overlayfs (rw,relatime,lowerdir=/,upperdir=/overlay) debugfs on /sys/kernel/debug type debugfs (rw,relatime) none on /proc/bus/usb type usbfs (rw,relatime) What do you see if you type: ls -la /sd Yeah, the directory is gone. I'll have to make it. I can see the sd directory in /dev/sdcard though. lrwxrwxrwx 1 root root 8 Jan 1 1970 sd -> /dev/sda Quote
fringes Posted August 17, 2014 Posted August 17, 2014 I saw in the /sd directory and performed a rm -r * I still don't know what you are saying. You saw what in the /sd directory? What directory were you in when you typed "rm -r *"? Yeah, the directory is gone. I'll have to make it. So when you did... mkdir /sd; reboot what happened? Quote
Ohm Posted August 17, 2014 Author Posted August 17, 2014 I still don't know what you are saying. You saw what in the /sd directory? What directory were you in when you typed "rm -r *"? So when you did... mkdir /sd; reboot what happened? I was in /sd. I didn't bother making a separate folder for my pcaps in the sd card. I can't make a directory. Because it already exist according the the OS. Which is probably the /dev/sdcard/sd. Even though i'm trying to make it at the root directory. Quote
fringes Posted August 17, 2014 Posted August 17, 2014 Yeah, the directory is gone. I'll have to make it. I can't make a directory. Because it already exist according the the OS. Perhaps you should start over. (reflash, reformat the /sd) You have nothing to save, and it should only take a few minutes. Quote
Ohm Posted August 18, 2014 Author Posted August 18, 2014 Perhaps you should start over. (reflash, reformat the /sd) You have nothing to save, and it should only take a few minutes. Yeah, i'll do that. Thanks for the help though. Cheers, Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.