maandverband
November 29th, 2008, 12:03 PM
In the English version of Ubuntu you can type
cd ~/Desktop
to CD to the Desktop. This doesn't work in other languages, because the names are localized. When typing the command
xdg-user-dir DESKTOP
the output of this command will tell you the location of the Desktop for the current user. For example /home/USERNAME/Bureaublad. Now you know you have to CD to Bureaublad instead of Desktop.
Is there a way to give the output of the xdg-user-dit command to the cd command, using the pipe character or something? I can't figure out how to do this.
This way I don't have to think about the language of the user, because the command will work for every language.
cd ~/Desktop
to CD to the Desktop. This doesn't work in other languages, because the names are localized. When typing the command
xdg-user-dir DESKTOP
the output of this command will tell you the location of the Desktop for the current user. For example /home/USERNAME/Bureaublad. Now you know you have to CD to Bureaublad instead of Desktop.
Is there a way to give the output of the xdg-user-dit command to the cd command, using the pipe character or something? I can't figure out how to do this.
This way I don't have to think about the language of the user, because the command will work for every language.