I have thousands of files stored in this location in a CentOs server:
All file names are like this:
This file name represents two numbers (123 and 45678) and a full date (2013/11/29) and a time (15:45:30)
I have a MySQL database named (filedb). A table named (files) has the following columns:
id ===== is a sequential number
source ===== is 123
destination ===== is 45678
date ==== is 11/29/2013
time ==== is 15:45:30
file ==== is the file name 123_45678_2013_11_29_15_45_30.gsm
note ==== is an empty field
I need a script which should insert an entry to the (filedb) database for each file in the /var/source/ directory.
Note that the first two sections (123) and (45678) can vary in length. They may be 3,4,5 or more digits. The only wan to recognise sections is by underscores.
I have already setup a username and a password for accessing the MySQL database.
Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline
In the years since this article was written, numerous hacking attacks have targeted password-protected web sites. The storage of client passwords has become a subject of much discussion, some of it useful and some of it misguided. Of cou…
There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
Learn how to find files with the shell using the find and locate commands.
Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.: