You know that Dropbox is terrific, of course. No? Go and check it out now.
One issue: files in your Public folder have a public URL, that you can send to other people. Unfortunately, directories do not. So how do you share a public directory full of files?
Answer: create an index.html file and share that. Let’s say that your files end in “.txt” and reside in ~/Dropbox/Public/entrez. Do this:
cd ~/Dropbox/Public/entrez echo "<ol>" > index.html for i in `ls *.txt`; do echo "<li><a href='$i'>$i</a></li>" >> index.html; done echo "</ol>" >> index.html
Now you can share the link to the index.html, which when clicked will display a list of links to all the other files in the directory.
Hi Neil,
I just want to point out that using `ls` in the for loop is not advised, because filenames that contain spaces will not be handled properly.
Instead, use an asterisk:
for i in *; do …
Well, I would not have spaces in my file names :-) But good point, thanks for the tip.
Pingback: BioBits » Blog Archive » Quick Links