Welcome to the Linux Foundation Forum!

lab 3.4_phony ls program

© Copyright The Linux Foundation 2024: DO NOT COPY OR DISTRIBUTE
3.4. LABS
1
Exercise 3.1: Adding the
̃
/work
directory to your path
Create a small file,
̃
/work/ls
, which contains just the line:
echo HELLO, this is the phony ls program.

Hello it is berni with a new question, maybe somebody has an answer:)

According to the sreenshot i get an error when trying to create the file..the same when i use the command in the solution: echo "echo HELLO, this is the phony ls program." > ̃/work/ls

bash: ̃/work/ls: No such file or directory

so what is the solution ?
thanks for your time and support.!

Answers

  • luisviveropena
    luisviveropena Posts: 1,294

    Hi @austrianadmin,

    The following: ̃/work

    Means a directory called 'work' in your home directory. So, let's say that your home directory is '/home/berni'. So when being there, you create the 'work' directory:

    mkdir work

    Then you enter the directory you just created:

    cd work

    Then create the fake 'ls' program:

    touch ls

    Put some content in the file:

    echo "echo HELLO, this is the phony ls program." > ˜/work/ls
    or
    echo "echo HELLO, this is the phony ls program." > ls

    , as you already are in the 'work' directory.

    Then add the executable permissions to it:

    chmod +x ls

    Then you should have the fake 'ls' file here:

    /home/berni/work/ls

    And from here you should be able to keep following the lab.

    Regards,
    Luis.

  • Hi Luis,

    thank you very much, now it is clear.

    regards

    bernhard

Categories

Upcoming Training