3
votes
1answer
195 views

Cowfiles directory?

My bashrc issues a cow from cowsay and with a random fortune. Like this: echo -e "\e[00;33m $(fortune -a -o -s | cowsay -f $(ls /usr/share/cowsay/cows/ | shuf -n1) | sed -e 's/^/ /g')\e[00m" ...
4
votes
1answer
463 views

How to utilize XDG directories and paths in Bash?

I wonder how to access not only the variables defined in ~/.config/user-dirs.dirs with xdg-user-dir, e.g. "$(xdg-user-dir VIDEOS)", but also the following standard variables: ...
4
votes
2answers
926 views

Why can't I navigate into my Documents directory?

I'm in bash and running F17 as su. My pwd is /home/user and when I ls I see Desktop Documents Downloads Music Pictures Public Templates Videos However, I'm unable to cd into any of these. My ...
0
votes
1answer
2k views

Looping over directory entries in bash and saving to an array

(See update at the foot of the question). This is a followup question to "Make directory copies using find". This question involved manipulating a bunch of directories, This got too complicated to ...
3
votes
3answers
268 views

bash function to find a directory recursively

How can I write a bash-function that finds a specific parent directory. Here's my setup: /home/user/dev/project1/branch1/deeply/nested/module/structure The app-server used for devs is located at: ...