Tmp directory

Ibnballo

New Member
Joined
May 31, 2021
Messages
9
Reaction score
4
Credits
58
PLEASE HOW CAN I SOLVE THIS.. I HAVE TRIED MY BEST BUT NOT WORKING RIGHT AS AM STILL GETTING ERROR MESSAGE

Rename the file hello_world which is in the /tmp directory to hello_school
Move the file hello_world from /root/my_school to /root
 

Attachments

  • 20210529-005915.png
    20210529-005915.png
    176.9 KB · Views: 417
  • 20210529-082753.png
    20210529-082753.png
    90.3 KB · Views: 429


should be something like:

# cd /tmp

mv hello_world hello_school

//that should replace hello_world to hello_school

the 2nd line [Move the file hello_world from /root/my_school to /root ]if done in linear time since it won't exist any more
 
should be something like:

# cd /tmp

mv hello_world hello_school

//that should replace hello_world to hello_school

the 2nd line [Move the file hello_world from /root/my_school to /root ]if done in linear time since it won't exist any more
Thanks. But I did the same but yet giving me error..

I am thinking maybe there's a way of creating the /tmp..

Also, I did not understand what you meant by ...if done in linear time since it won't exist any more
 
Thanks. But I did the same but yet giving me error..

I am thinking maybe there's a way of creating the /tmp..

Also, I did not understand what you meant by ...if done in linear time since it won't exist any more


And also, please what do you mean by "if done in linear time...."
 
Thus s what I am asked to do

Rename the file hello_world which is in the /tmp directory to hello_school
Move the file hello_world from /root/my_school to /root
 
Rename the file hello_world which is in the /tmp directory to hello_school
Move the file hello_world from /root/my_school to /root
You seem to be using a terminal on a smartphone. Not sure if that makes any difference with your school problem, or if it is correctly emulating a Linux filesystem. I would recommend going through the entire lesson from the beginning to reinforce the concepts it is teaching you... which is filesystem structure, and how to navigate within the filesystem and move files from one place to another.

To start... look carefully at your error. It does not say anything about /root. It is specifically talking about /tmp. Again, thinking about this carefully.... /my_school/tmp is NOT the same location in the filesystem as /tmp.

As @captain-sensible is telling you, you need mkdir to create /tmp... or so it seems from your error report. Or if /tmp already exists, you are not using it. Try ls /tmp to see if there are any files already there.
 
Last edited:
the command mv can be used to move stuff and also renames files, thus if you use the command:

Code:
 mv hello_world  hello_school

it means the file that was hello_world becomes hello_school and so, hello_world fiel no longer exists.
 
i reckon /tmp is ubiquitous i would be very surprsied if you had to create that directory for any linux OS ; on Slackware /tmp is used in slackbuild process ; on Arch:

Code:
[andrew@darkstar:~]$ cd /                                     (05-31 19:26)
[andrew@darkstar:/]$ ls --color                               (05-31 21:46)
bin@   etc/   lib64@       mnt/   root/  srv/        tmp/
boot/  home/  lost+found/  opt/   run/   sys/        usr/
dev/   lib@   media/       proc/  sbin@  timeshift/  var/
[andrew@darkstar:/]$                                          (05-31 21:46)
 
You seem to be using a terminal on a smartphone. Not sure if that makes any difference with your school problem, or if it is correctly emulating a Linux filesystem. I would recommend going through the entire lesson from the beginning to reinforce the concepts it is teaching you... which is filesystem structure, and how to navigate within the filesystem and move files from one place to another.

To start... look carefully at your error. It does not say anything about /root. It is specifically talking about /tmp. Again, thinking about this carefully.... /my_school/tmp is NOT the same location in the filesystem as /tmp.

As @captain-sensible is telling you, you need mkdir to create /tmp... or so it seems from your error report. Or if /tmp already exists, you are not using it. Try ls /tmp to see if there are any files already there.

@stan great, I tried the ls /tmp and I noticed there was a file in the /tmp directory called hello_world that causes the error.
 

Attachments

  • 20210531-214721.png
    20210531-214721.png
    119.7 KB · Views: 379
I tried the ls /tmp and I noticed there was a file in the /tmp directory called hello_world that causes the error.
Good news! :)


Rename the file hello_world which is in the /tmp directory to hello_school
So doing this step properly now, on the correct file in /tmp, will fix the error that you have shown us. And you'll use the mv command to rename the file. Rather than tell you exactly, I hope you know this step yourself now.

But we don't know the full scope of your assignment, so when you rename the file and submit it, you may get another error for another reason. We'll try to help you get through it. But we want you to learn what it is that you're doing... not just give you the answers. Good luck! :)
 
Good news! :)



So doing this step properly now, on the correct file in /tmp, will fix the error that you have shown us. And you'll use the mv command to rename the file. Rather than tell you exactly, I hope you know this step yourself now.

But we don't know the full scope of your assignment, so when you rename the file and submit it, you may get another error for another reason. We'll try to help you get through it. But we want you to learn what it is that you're doing... not just give you the answers. Good luck! :)

Thanks for the support
 
To make sure it's nice and clear - for everyone.

We will help show you how to do your homework.
We will give you the tools to do your homework.
We will not do your homework.

I don't think that's a formal rule, but it's one we've adhered to for as long as I've been here. It could probably be a formal rule, but we can't possibly enumerate everything.
 
To make sure it's nice and clear - for everyone.

We will help show you how to do your homework.
We will give you the tools to do your homework.
We will not do your homework.

I don't think that's a formal rule, but it's one we've adhered to for as long as I've been here. It could probably be a formal rule, but we can't possibly enumerate everything.
Understood thanks
 

Staff online

Members online


Top