Archive for March, 2009

Bulk File Rename

Tuesday, March 24th, 2009

Situation: I have multiple files with extension .sh.modified and I need to rename them all into .sh extension. Solution: for file in *.sh.modified; do mv ${file} ${file%sh.modified}.sh; done

How to check for new files in a directory

Saturday, March 21st, 2009

Made this small script for this purpose… #!/bin/bash # # Script to check a directory and write in file the new files # since last check. # ...

Using variables in sed

Tuesday, March 10th, 2009

In a world of Perl, sed seems to be an archaic method of doing things reserved to the real brave geeks! But sometimes sed does perfectly fantastic job, like it did for me few minutes ago… with some caveats. My goal was to replace $i with the value ...

Enabling root access to vsftpd

Friday, March 6th, 2009

It took me a while to figure out due to misleading information over the vast Internet suggesting to search for non existing /etc/vsftpd.users or something like this. Thing you have to do is to edit /etc/ftpusers and remove root from there.