[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Searching for a directory to get the holding device
From: |
Arbiel (gmx) |
Subject: |
Re: Searching for a directory to get the holding device |
Date: |
Wed, 10 Feb 2016 19:24:22 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 |
Le 10/02/2016 17:43, Andrei Borzenkov a écrit :
> 10.02.2016 17:45, Arbiel (gmx) пишет:
>> Hi
>>
>> I haven't been clear enough. The question is not searching for a file,
>> but for a directory, when you don't know any name of the enclosed files.
>>
>> Is there a search parameter "path"
>>
>> search --path /path/to/path ?
>>
> No, not currently.
Thank you. So I will loop the device list, and test
if [ -d ($dev)/${directory ]; then … ; fi;
>
>> Le 10/02/2016 13:10, Andrei Borzenkov a écrit :
>>> On Wed, Feb 10, 2016 at 2:29 PM, Arbiel (gmx) <address@hidden> wrote:
>>>> Hi
>>>>
>>>> Is it possible to have grub search for a directory
>>>>
>>>> search --set=device --xxxx "${dir_path}"
>>>>
>>> Of course.
>>>
>>> search --file /path/to/file
>>>
>>> Do not forget that path always must be absolute, grub always starts
>>> from the root of filesystem
>>>
>>>> without having to loop on all devices and testing whether
>>>> (device)/${dir_path} is a directory or not ?
>>>>
>>>> Arbiel
>>>>
>>>>
>>>> _______________________________________________
>>>> Help-grub mailing list
>>>> address@hidden
>>>> https://lists.gnu.org/mailman/listinfo/help-grub
>>>>
>>
>
signature.asc
Description: OpenPGP digital signature