• We did not send an email asking for donations - please read this post.

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: 254
  • 20210529-082753.png
    20210529-082753.png
    90.3 KB · Views: 290


captain-sensible

Well-Known Member
Joined
Jun 14, 2019
Messages
2,913
Reaction score
1,970
Credits
18,126
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
 
OP
I

Ibnballo

New Member
Joined
May 31, 2021
Messages
9
Reaction score
4
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
 
OP
I

Ibnballo

New Member
Joined
May 31, 2021
Messages
9
Reaction score
4
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...."
 
OP
I

Ibnballo

New Member
Joined
May 31, 2021
Messages
9
Reaction score
4
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
Joined
Mar 19, 2018
Messages
1,004
Reaction score
1,134
Credits
9,370
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
Joined
Jun 14, 2019
Messages
2,913
Reaction score
1,970
Credits
18,126
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
Joined
Jun 14, 2019
Messages
2,913
Reaction score
1,970
Credits
18,126
OP
I

Ibnballo

New Member
Joined
May 31, 2021
Messages
9
Reaction score
4
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

  • 20210531-214721.png
    20210531-214721.png
    119.7 KB · Views: 240

stan

Well-Known Member
Joined
Mar 19, 2018
Messages
1,004
Reaction score
1,134
Credits
9,370
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! :)
 
OP
I

Ibnballo

New Member
Joined
May 31, 2021
Messages
9
Reaction score
4
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
Joined
Jul 23, 2020
Messages
7,372
Reaction score
6,356
Credits
59,773
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.
 
OP
I

Ibnballo

New Member
Joined
May 31, 2021
Messages
9
Reaction score
4
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!

Linux.org Hosting Donations
Consider making a donation

Members online


Top