Linux From ScratchThis Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
in section 6.5 of lfs-7.2 use install command for create root and tmp and var/tmp directories.
I want to know exactly why we use install command vs mkdir
I saw install man and my question is :
Code:
SYNOPSIS
install [OPTION]... SOURCE DEST (1st format)
install [OPTION]... SOURCE... DIRECTORY (2nd format)
install -d [OPTION]... DIRECTORY... (3rd format)
DESCRIPTION
In the first two formats, copy SOURCE to DEST or multiple SOURCE(s) to the existing DIRECTORY, while setting permission modes and owner/group. In the third format, create all components of the given DIRECTORY(ies).
see here: http://linux.die.net/man/1/mknod
c means create a character special file, 5 1 and 1 3 are the major/minor addresses.
About major and minor "numbers" see here: http://www.win.tue.nl/~aeb/linux/lk/lk-11.html
(Devices have a number, the device number, a combination of major and minor device number. Traditionally, the major device number gives the kind of device, and the minor device number is some kind of unit number. However, there are no rules - it is best to consider a device number a cookie, without known structure.)
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,150
Rep:
Quote:
Originally Posted by k84834
in section 6.5 of lfs-7.2 use install command for create root and tmp and var/tmp directories.
I want to know exactly why we use install command vs mkdir
I saw install man and my question is :
Code:
SYNOPSIS
install [OPTION]... SOURCE DEST (1st format)
install [OPTION]... SOURCE... DIRECTORY (2nd format)
install -d [OPTION]... DIRECTORY... (3rd format)
DESCRIPTION
In the first two formats, copy SOURCE to DEST or multiple SOURCE(s) to the existing DIRECTORY, while setting permission modes and owner/group. In the third format, create all components of the given DIRECTORY(ies).
what is the meaning of red part ?
Install is used because it can set permissions and create parent directory's depending on the options used, try
Code:
install -d /tmp/x/y/z
as you can see the folders /tmp/x /tmp/x/y and /tmp/x/y/z are created this is the same as
Code:
mkdir -p /tmp/x/y/z
but mkdir doesn't set permissions
Last edited by Keith Hedger; 10-01-2012 at 06:16 AM.
thank you keith hedger and pan64
your guidance be more helpful
I have another question .
can anyone tell me what is ld-new and why we didn't use it from the beginning?
can anyone explain to me what is the meaning of doing these?
Code:
make -C ld clean
make -C ld LIB_PATH=/usr/lib:/lib
cp -v ld/ld-new /tools/bin
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,150
Rep:
Quote:
Originally Posted by k84834
thank you keith hedger and pan64
your guidance be more helpful
I have another question .
can anyone tell me what is ld-new and why we didn't use it from the beginning?
can anyone explain to me what is the meaning of doing these?
Code:
make -C ld clean
make -C ld LIB_PATH=/usr/lib:/lib
cp -v ld/ld-new /tools/bin
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.