Tmp directory

Ibnballo

New Member
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



captain-sensible

Well-Known Member
Credits
11,408
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
 

Ibnballo

New Member
Credits
58
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
 

Ibnballo

New Member
Credits
58
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...."
 

Ibnballo

New Member
Credits
58
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
 

stan

Well-Known Member
Credits
6,591
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:

captain-sensible

Well-Known Member
Credits
11,408
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.
 

captain-sensible

Well-Known Member
Credits
11,408

Ibnballo

New Member
Credits
58
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

stan

Well-Known Member
Credits
6,591
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! :)
 

Ibnballo

New Member
Credits
58
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
 

KGIII

Super Moderator
Staff member
Gold Supporter
Credits
19,756
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.
 

Ibnballo

New Member
Credits
58
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
 
$100 Digital Ocean Credit
Get a free VM to test out Linux!

Members online


Latest posts

Top