LFS v10 4.2. Creating a limited directory layout
by milton27b from LinuxQuestions.org on (#5D8DY)
OK, don't be too hard on me. I've been a casual/beginner user for a while now but don't work in tech and never had a reason to go very deep. It's been a nagging need-to-know for awhile now and recently decided i would dive in and learn everything I can.
figured LFS would be a great way to learn.
Now I'm stuck near the beginning and feeling a little discouraged.
made it to section 4.2 where I'm given the following command;
mkdir -pv $LFS/{bin,etc,lib,sbin,usr,var}
case $(uname -m) in
x86_64) mkdir -pv $LFS/lib64 ;;
esac
I've been trying to type everything out and analyze commands before I enter them but I cant get this command to run.
When I type it out (with sudo), everything wants to stick to one line and it won't run. When I type 'sudo' and then copy/paste it runs the first bit automatically, pulls up a new prompt and tries to run the second bit starting at the case statement.
xxxxxx@localhost:/mnt/lfs> sudo mkdir -pv $LFS/{bin,etc,lib,sbin,usr,var}
mkdir: created directory '/mnt/lfs/bin'
mkdir: created directory '/mnt/lfs/etc'
mkdir: created directory '/mnt/lfs/lib'
mkdir: created directory '/mnt/lfs/sbin'
mkdir: created directory '/mnt/lfs/usr'
mkdir: created directory '/mnt/lfs/var'
xxxxxx@localhost:/mnt/lfs> case $(uname -m) in
> x86_64) mkdir -pv $LFS/lib64 ;;
> esac
mkdir: cannot create directory /mnt/lfs/lib64': Permission denied
I knew it would work but afterward I tried to sudo the case statement.
xxxxxx@localhost:/mnt/lfs> sudo case $(uname -m) in
sudo: case: command not found
xxxxxx@localhost:/mnt/lfs> > x86_64) mkdir -pv $LFS/lib64 ;;
bash: syntax error near unexpected token `)'
cumerb@localhost:/mnt/lfs> > esac
Then I thought, 'I think I can make an executable file to run that command'. All I could get it to do was print the command in text on the screen.... something else I gotta figure out.
I hate asking for help but I really want to keep moving otherwise I'll get discouraged and walk away. Like that time i tried to make a flatpak.
Thanks in advance.


figured LFS would be a great way to learn.
Now I'm stuck near the beginning and feeling a little discouraged.
made it to section 4.2 where I'm given the following command;
mkdir -pv $LFS/{bin,etc,lib,sbin,usr,var}
case $(uname -m) in
x86_64) mkdir -pv $LFS/lib64 ;;
esac
I've been trying to type everything out and analyze commands before I enter them but I cant get this command to run.
When I type it out (with sudo), everything wants to stick to one line and it won't run. When I type 'sudo' and then copy/paste it runs the first bit automatically, pulls up a new prompt and tries to run the second bit starting at the case statement.
xxxxxx@localhost:/mnt/lfs> sudo mkdir -pv $LFS/{bin,etc,lib,sbin,usr,var}
mkdir: created directory '/mnt/lfs/bin'
mkdir: created directory '/mnt/lfs/etc'
mkdir: created directory '/mnt/lfs/lib'
mkdir: created directory '/mnt/lfs/sbin'
mkdir: created directory '/mnt/lfs/usr'
mkdir: created directory '/mnt/lfs/var'
xxxxxx@localhost:/mnt/lfs> case $(uname -m) in
> x86_64) mkdir -pv $LFS/lib64 ;;
> esac
mkdir: cannot create directory /mnt/lfs/lib64': Permission denied
I knew it would work but afterward I tried to sudo the case statement.
xxxxxx@localhost:/mnt/lfs> sudo case $(uname -m) in
sudo: case: command not found
xxxxxx@localhost:/mnt/lfs> > x86_64) mkdir -pv $LFS/lib64 ;;
bash: syntax error near unexpected token `)'
cumerb@localhost:/mnt/lfs> > esac
Then I thought, 'I think I can make an executable file to run that command'. All I could get it to do was print the command in text on the screen.... something else I gotta figure out.
I hate asking for help but I really want to keep moving otherwise I'll get discouraged and walk away. Like that time i tried to make a flatpak.
Thanks in advance.