I am fairly new to Linux and have been trying to move some files around with terminal on my external hard drive but I can't seem to get it to work. I am using a generic external hard drive with a ext4 format but not matter what I try I can't do anything with it through my terminal. The Drive's name does have spaces in it so when ever I do something in terminal it tries to separate the externals name and the spits out no directory found. is there a way to make it recognize the name without removing the spaces? Any help would be more than grateful.
1 Answer
Welcome to Linux! A trick that will get you started here (and will save you from getting carpal tunnel in the future) is "tab completion":
$ ls /med then press Tab to see
$ ls /media/ If you press Tab again, you might see a list of possible options to continue the path,
$ ls /media/ MyBigExternalDrive/ My Example Hard Drive/ or (if there is only one path) the entire path will be completed:
$ ls /media/My\ Example\ Hard\ Drive/ Tricks like this are nice because you can learn seemingly unrelated syntax. In this case, you can write out paths with spaces by putting a \ in front of the space.
- Oh wow. thank you so much i never knew about this miricle called tab complete. that should shorten how much i have to type quite alot.Ferothin– Ferothin2015-05-13 22:37:09 +00:00Commented May 13, 2015 at 22:37
/media/'name of my drive'or use backslashes to escape the spaces:/media/name\ of\ my\ drive