| Hidden files /directories | |
|
|
Author | Message |
---|
Laz Gecko
Posts : 201 Join date : 2012-06-13 Location : Delta BC
| Subject: Hidden files /directories Sat Sep 13, 2014 6:35 pm | |
| I have a USB key that has a couple of hidden directories, and I would like to see what's up. The ls command shows: linux-02pi:/dev/usb # ls -a . .. hiddev0 Can anyone show me how to access . and .. to do a file listing? Thanks
| |
|
| |
bozo Admin
Posts : 402 Join date : 2010-02-23 Location : Way out in the sticks in the Gold Country of California
| Subject: Re: Hidden files /directories Mon Sep 15, 2014 3:06 am | |
| The . and .. entries are not really hidden directories, just shorthand for the current directory (.) and the parent directory of the current directory (..), i.e. the next directory above the one you're in. So running - Code:
-
ls -a and - Code:
-
ls -a . will give identical results. Running - Code:
-
ls -a .. will give the contents of the directory above the current directory (in your case /dev). - Code:
-
ls -a hiddev0 should give you the contents of that directory, assuming you have access rights. Knowing the .. shorthand can be quite handy if you are currently in ~/directory_a/a_name_composed_of_a_ridiculous_number_of_random_characters/another_directory and you want to move up one level. - Code:
-
cd .. can save a lot of keystrokes. | |
|
| |
Laz Gecko
Posts : 201 Join date : 2012-06-13 Location : Delta BC
| Subject: Re: Hidden files /directories Mon Sep 15, 2014 3:10 pm | |
| [quote="bozo" - Code:
-
ls -a hiddev0 should give you the contents of that directory, assuming you have access rights. [/quote] I tried the command both as a normal and admin user, but all I get as a response is that hiddev0 is not a file, or directory. This begs the question: if so, what is it? I am tempted to re-format the USB stick and get rid of it, but I"m curious. Thanks for the clarifications, it's great to see something in plain English. | |
|
| |
bozo Admin
Posts : 402 Join date : 2010-02-23 Location : Way out in the sticks in the Gold Country of California
| Subject: Re: Hidden files /directories Mon Sep 15, 2014 3:41 pm | |
| My first guess off the top of my head is that hiddev0 is something like a boot sector or partition table on a hard drive, one of those hidden sectors that you never see but the hard drive needs to operate. You might try ls -l to get the size and permissions, and the date (if the date is the date of manufacture, you might not want to delete it!). Or use the Linux equivalent of the DOS DEBUG command (sorry, I'm having a senior moment and I'm too lazy to look it up) where you can actually see the bits and bytes and maybe figure out what's there. Or if it's cheap enough that you don't mind bricking the thing, just go ahead and take the chance of deleting hiddev0, or formatting the drive, and see what happens! | |
|
| |
Laz Gecko
Posts : 201 Join date : 2012-06-13 Location : Delta BC
| Subject: Re: Hidden files /directories Tue Sep 16, 2014 8:38 pm | |
| - bozo wrote:
- My first guess off the top of my head is that hiddev0 is something like a boot sector or partition table on a hard drive,
Well, since it is a USB stick that was used solely to store files temporarily, it shoud'nt have a boot sector. When I tried ls -l hiddev0 it informed me that this was neither a file, nor a directory. The search continues. Thank you for the info, I filed it for future reference. | |
|
| |
bdquick Admin
Posts : 583 Join date : 2010-02-22 Age : 45 Location : Central Iowa
| Subject: Re: Hidden files /directories Wed Sep 24, 2014 7:52 pm | |
| Could be the file table listing. If you plug this drive into windows does it come with "helpful software"? That could also be stored there. | |
|
| |
Laz Gecko
Posts : 201 Join date : 2012-06-13 Location : Delta BC
| Subject: Re: Hidden files /directories Sat Sep 27, 2014 1:51 am | |
| Looks like I misunderstood the use of the lsusb command. Turns out it provides only a description of the usb drive. I can't confirm yet, but I'm guessing hiddev0 may stand for Hardware ID Device 0. To see the files on the stick, I needed to run lsblk, which provides the correct path to the drive for the ls command.
| |
|
| |
bozo Admin
Posts : 402 Join date : 2010-02-23 Location : Way out in the sticks in the Gold Country of California
| Subject: Re: Hidden files /directories Sat Sep 27, 2014 4:23 pm | |
| Thanks for the follow-up! | |
|
| |
Sponsored content
| Subject: Re: Hidden files /directories | |
| |
|
| |
| Hidden files /directories | |
|