Welcome to the Linux Foundation Forum!

wastemem script

Copying and pasting the wastemem script is taking more time than I'd like.

running this:

gcc -o lab_wastemem lab_wastemem.c

results in

c1: fatal error: lab_wastemem.c: No such file or directory

Thanks for assistance.

Comments

  • Hi Michael,

    You are most likely trying to compile lab_wastemem.c in the wrong directory. Try to find the absolute path of the file, that may help you:

    gcc -o lab_wastemem /home/youruser/Downloads/LFS207/SOLUTIONS/s_17/lab_wastemem.c

    Reagrds,
    Vlad

  • coop
    coop Posts: 916

    Thanks @vipopescu. In fact as you scroll down to the solution you will also see s_17/lab_waste.sh. Which will do the compile for you although it is so simple it adds little. Make sure you understand the "RESOURCES" and "SOLUTIONS" tar balls that are mentioned in the introduction. You will need to use them again when you get to the virtualization labs for example. You definitely were not meant to cut and paste the source for the lab. Very error-prone.

  • Thanks guys! I figured out my mistake. You're right @vipopescu, I was simply in the wrong directory!

  • problem see SOLUTIONS/s_16/lab_wastemem.ch
    problem see SOLUTIONS/s_16/lab_waste.sh

    above given lab link was is not valid link could please share valid script .sh ?

  • luisviveropena
    luisviveropena Posts: 1,249

    Hi @sriramvassuthev,

    I just downloaded the "solutions" file and extracted it. Once you have extracted the .tar.xz file, you will find the files here:

    LFS207/SOLUTIONS/s_16/

    Perhaps you missed the LFS207 directory.

    Regards,
    Luis.

  • Yes Correct I missed the that file Yeah i got in from this below link.

    https://prep.lf.training/?course=LFS207

    Regards,
    Sriramvassuthev

  • luisviveropena
    luisviveropena Posts: 1,249

    Hi Sriramvassuthev,

    I'm glad that the issue is solved.

    Regards,
    Luis.

  • Hello Luisviveropena,

    Yes. It Resolve.

    When I saw the Script. where lab_waste.sh is integrated with lab_wastemem.ch.

    When I Learning this Chapter -21. Filesystem Features: Attributes, Creating, Checking, Usage, Mounting -> Mounting Filesystems (Lesson).

    Each filesystem is mounted under a specific directory, as in the following command:

    $ mount -t ext /dev/sdb4 /home

    • Mounts an ext4 filesystem
    • Usually not necessary to specify the type with the -t option
    • The filesystem is located on a specific partition of a hard drive (/dev/sdb4)
    • The filesystem is mounted at the position /home in the current directory tree
    • Any files residing in the original /home directory are hidden until the partition is unmounted

    In this , instead of ext have to user ext4 in the command.

    Thanks & Regards,
    Sriram Vassuthev.S

  • luisviveropena
    luisviveropena Posts: 1,249

    Hi @sriramvassuthev, I'm glad that the original issue was solved :)

    Regarding the second thing:

    Usually not necessary to specify the type with the -t option

    Yep, that's right, the OS will try to auto detect it. But also it's not wrong, and in some cases it can be useful, if the OS don't recognize the filesystem type. From the man page for 'mount':

    If no -t option is given, or if the auto type is specified, mount will try to guess the desired type. Mount uses the blkid or volume_id library for guessing the filesystem type; if that does not turn up anything that looks familiar, mount will try to read the file /etc/filesystems, or, if that does not exist, /proc/filesystems. All of the filesystem types listed there will be tried, except for those that are labeled "nodev" (e.g., devpts, proc and nfs). If /etc/filesystems ends in a line with a single * only, mount will read /proc/filesystems afterwards.

    Regards,
    Luis.

  • Hi @Luis,

    I am clear.

    By Blank, i am asking below question.

    is there filesystem type easily to adopt with different machine and different OS can easily understand mount into system and do process as per user request or Machine request?

    Like Common to all OS. Instruction will be different for each OS.

    is there any tool to backup only Meta Data Information of System ?

    Regards,
    Sriram Vassuthev.S

  • luisviveropena
    luisviveropena Posts: 1,249

    Hi @sriramvassuthev,

    is there filesystem type easily to adopt with different machine and different OS
    can easily understand mount into system and do process as per user request or Machine request?

    Can you elaborate on this, please? Do you want to access a filesystem through the network from more than one device?

    Please open a new thread for this question, as it's different from the original one, which is already solved.

    Regards,
    Luis.

  • Yes Ok. I will Open it new thread.

Categories

Upcoming Training