0

In terminal, I need to do cd desktop then cd data then ls data. Data is a folder that connects windows partition of the computer to ubuntu.

cd Desktop was initially giving me an error (bash: cd: no such file or directory). I instead typed cd ~/Desktop, which worked. However, I cannot use cd data and I get the same error as before. I even tried cd ~/data. It does not work. Any help would be immensely appreciated.

2 Answers2

2

That's the difference between command line and GUI. The icon you see isn't actually there. Under Ubuntu, typically USB disks and partitions are automatically mounted at /media/username folder.

The GUI icon you see on the desktop is just a "shortcut" in a sense, but the actual folder to which the partition is mounted is elsewhere. When you open it in GUI file manager, and press Ctrl+L you should see the real path to the mountpoint.

As for the part where you need to ls Data please note two things:

  1. File and directory names are case sensitive.
  2. If you cd Data you're telling the shell to enter the Data directory that should be located relative to where your shell is right now, i.e. the current working directory. Doing cd ~/Desktop works because you told it the full path, not relative. When you cd ~/Desktop; ls Desktop it won't work - there's no Desktop within ~/Desktop. If you just run ls with no arguments, then it will work, because it lists items in the current directory by default
dessert
  • 40,956
-1

If I understand you right, you are looking to access data folder on your desktop.

Try cd ~/desktop/data then ls to get the contents of this directory.

If you want to create a shortcut use ln -s <actual path>. It says create a shortcut (in linux terms softlink to the actual path) in the current location.