Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Ermmm, how shall I put this? My girlfriend is in Germany. She sent me some photos of herself, lightly clad. I'd like to batch rename them with . in front so they are not generally visible for anyone using this computer.
Some bash command like rename /pics/.babypics/*.jpg .*.jpg
Hey thanks! It's just sometimes, not very often other people use my laptop. I'd rather they didn't see her pics by accident, even though they are not exactly pornos! Using Ubuntu, with this thing called dash, I nearly showed them to a whole classroom full of students recently! Dash keeps a record of recently used files and puts a thumbnail up! Luckily, the overhead projector had gone to sleep!! But it won't show them if they are hidden!
That's probably because cmds in bash are newline separated. If you put them all on one line, you need some sort of separator.
Try it on multiple lines are per the example in a shell script.
Alternately (just for fun) you can enter one line, then hit enter and you'll get an editor continuation symbol thus '>' eg
# This written one line at a time, then <enter>
for f in *.jpg
# this is what the result looks like if you recall it (ie up-arrow). note the auto-inserted ';'s
for f in *.jpg; do stuf; done