Jump to content

Recommended Posts

Posted

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?

Posted

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.

Posted

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

Posted
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?

Posted

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.

Posted
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.

Posted

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,

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...