ls command

jasmine111

New Member
Joined
Dec 21, 2020
Messages
3
Reaction score
2
Credits
24
hello! I am a beginner in linux. I made a command "mkdir -p ~/desktop/bin" and then bin is visible in deskop with ls command. However, any other files existing in deskop were not visible with ls command. What shall I do? Please help me with this problem.
 


Did you add any other files or folders to ~/desktop? If not, then the bin folder is all that is there, which you created with the mkdir command.

I suspect you may have wanted to create ~/Desktop/bin. The Desktop folder (with capital D) is what you see when you boot your system, and you may have files or folders there that is what you expected to see. Linux is case sensitive, so Desktop and desktop are not the same.

Open an terminal and try both of these:
Code:
ls ~/Desktop
ls ~/desktop

The ~/ is a shortcut for your home folder. So the following should give the same results:
Code:
ls /home/jasmine/Desktop
ls /home/jasmine/desktop

# Change 'jasmine' to your real user name, if different from this example.
 
Did you add any other files or folders to ~/desktop? If not, then the bin folder is all that is there, which you created with the mkdir command.

I suspect you may have wanted to create ~/Desktop/bin. The Desktop folder (with capital D) is what you see when you boot your system, and you may have files or folders there that is what you expected to see. Linux is case sensitive, so Desktop and desktop are not the same.

Open an terminal and try both of these:
Code:
ls ~/Desktop
ls ~/desktop

The ~/ is a shortcut for your home folder. So the following should give the same results:
Code:
ls /home/jasmine/Desktop
ls /home/jasmine/desktop

# Change 'jasmine' to your real user name, if different from this example.
Thank you very much Stan! It worked. My previous files were in Desktop and bin folder was in desktop. I did not notice it at all. Your answer was very hellpful.
 

Members online


Top