6.2.3 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Home Screenshots Features Awards & Translations Download Help Forums Author Donate |
1. Purpose of TinyScanA. Functional Help2. Application Menus3. Output Table Structure 4. Tree 5. Sorting 6. Status Bar 7. Network Drive 8. Command Line 8.1 Scheduling 8.2 Network Scan 9. System Account 10. Importing the data into another program 11. SQL Queries B. Technical Help12. Out of memory13. Caution 14. Bugs 15. Java C. And more16. To do17. License 18. Credits 19. Home Page 1. Purpose of TinyScan Un autre regard sur vos données. A disk usage utility. Output a table and a tree. Export the result to Excel, Access, MySQL, etc. Report disk usage of remote computers. A. Functional Help2. Application Menus
3. Output Table Structure
You can move the columns. 4. Tree The same data in a tree. You can move around with the mouse or the arrow keys. 5. Sorting Click on a column header to sort: not sorted, ascending and descending (1st, 2nd, 3rd mouse click). Ctrl + mouse click for a compound sort. For example, sort on folder descending (2 mouse clicks) then press the Ctrl key (keep it pressed) then sort on path ascending and on name ascending. You can sort by folders, then press the Ctrl key, then sort by files then size, etc. - Sorting the table will also sort the tree. Click on "Refresh". 6. Status Bar Click on the status bar to clean it. 7. Network drive You can scan a network drive. You can also a UNC path directly. Java does not(!) need to be installed on the remote computer. 8. Command Line TinyScan can also be run from the command line (= text mode). On Windows, if you have it on your desktop, open a Command Prompt: cd Desktop java -jar tinyscan.jar --help 8.1 Scheduling You can use TinyScan from the command line to schedule a scan. On Windows, create a batch file: @echo off java -jar c:\tinyscan\tinyscan.jar c:\ -f c:\tinyscan\panda.txt Then go to Control Panel -> Scheduled Tasks to schedule it. On Linux, you can put a script in /etc/cron.weekly for example. You can also edit the file /etc/crontab or use the "crontab" command. Or use "at" for a one shot. 8.2 Network Scan You can also scan several computers on your (Windows) network. java -jar c:\tinyscan\tinyscan.jar -s 192.168.0.5 -e 192.168.0.10 c$ -F c:\scan java -jar c:\tinyscan\tinyscan.jar -s 192.168.0.5 -e 192.168.0.10 "c$\Documents and Settings" -F c:\scan The network scan is slow. - You can count the number of licences used for a particular program by scanning for a specific folder on a range of computers. - Check a "dll" version. - It is not intented to spy. You can easily prevent scans by changing the permissions on a folder. You can also audit your folders for intrusion. Also each member of your staff should have his own account for administration. 9. System Account You can stay in your session and scan with a system account. Open a command prompt: runas /user:dom1\staff5 tinyscan_high_memory.bat 10. Importing the data into another program You can save the scan in a file and reopen it later. With TinyScan or another program. - TinyScan: File-> Open. If the result is too big (too much rows), check "Skip Files" in the Open dialog box. - Excel (2003): File-> Open. In Files of type: chooses All Files (*.*). Or right-click the text file then chooses Open With-> Excel. Once the file is opened in Excel, you can decide to save it to Excel's format: File -> Save As -> Save as type: ...(*.xls). - Use Access (2003) if you have more than 65,536 rows. File-> Open. In Files of type: chooses All Files (*.*). Or right-click the text file then chooses Open With-> Access. For date and scandate, choose the Data Type: "Text". For sizeb and checksum, choose Double. Better: Open tinyscan.mdb. If asked to convert the database, answer "Convert Database". Then File-> Get External Data -> Import... -> File of type: Text File (*.txt; *.csv; *.tab; *.asc). Delimited -> Tab. Check "First Row contains Field Names". And select the Text Qualifier: " Then choose "In an Existing Table" -> Import to table: scan. - OpenOffice Calc: Use the file type Text CSV (*.csv,*.txt) to import the data. - OpenOffice Base: File -> New -> Database Connect to an existing database Text Next>> For the "Path to text files", choose the folder containing the scan results. Type of files: Plain text files (*.txt) Field Separator: {Tab} Text Separator: " - Gnumeric won't ask any question. - MySQL / EasyPHP / phpMyAdmin: phpMyAdmin won't import files above 2MB. Follow the instructions from the file filename-mysql.txt. Then, you can do your queries through phpMyAdmin's web interface. Or directly from MySQL (there is a pager and a history between sessions on the Linux version). Or with MySQL Query Browser. 11. SQL Queries mysql> # Displaying the scan history: USE tinyscan; DROP VIEW v1; CREATE VIEW v1 AS SELECT DISTINCT node, path, name, scandate, scantime FROM scan WHERE parent = 0 ORDER BY node, scandate, scantime; SELECT * FROM v1;
# Sample query: SELECT path, name FROM scan WHERE type = 'audio' AND sizemb >1 AND node = 'usbdisk' AND scandate = '2006-09-30'; # MySQL, Access # To keep the queries simple, we remove the history: DELETE FROM scan WHERE node='usbdisk' AND scandate < '2006-09-30'; SELECT path, name, date, time FROM scan WHERE date BETWEEN '2006-07-01' AND '2006-08-01' AND path LIKE '%documents%' AND path NOT LIKE '%programmation%' AND TYPE = 'file' AND node = 'usbdisk'; # MySQL (with Access, use * instead of %) mysql> # We recompute sizemb to avoid rounding errors SELECT ext, ROUND( SUM( sizeb ) /1024 /1024, 1 ) AS sizemb, COUNT( * ) FROM scan WHERE node = 'usbdisk' GROUP BY ext ORDER BY sizemb DESC; # MySQL
# Looking for duplicate files: ############################## # This is not efficient and can hang MySQL until the request ends. DROP TABLE duplicates; CREATE TABLE duplicates ( csum BIGINT ); INSERT INTO duplicates(csum) ( SELECT csum FROM ( SELECT DISTINCT COUNT(*), csum FROM scan WHERE csum !=-1 AND sizeb > 0 AND node = 'usbdisk' GROUP BY csum HAVING COUNT(*) >1 )qdupl ); # This query may take some time to proceed: SELECT path, name, sizemb, scan.csum FROM scan, duplicates WHERE scan.csum = duplicates.csum AND sizemb > 1 order by 4; ############################## MySQL B. Technical Help12. Out of memoryTinyScan can run out of memory when scanning a disk or opening a saved scan. In this case: - Use tinyscan_high_memory.bat. - Scan a folder instead of a whole hard drive. - Or choose the option "Skip files". - You can also choose "Scan To File" if you plan to use the data with another application. 13. Caution When scanning, TinyScan is processor intensive and does a lot of disk access. So if you plan to scan a server: - You should not do it at peak time. - Or you should give the process a low priority. - Or scan a drive remotly, which will at least put the processor load on the client. Computing the checksum is processor intensive and makes the scan much slower. The Adler-32 checksum can be forged easily and is therefore unsafe for protecting against intentional modification. 14. Bugs When the checksum option is activated, TinyScan can stop processing folders. So some folders won't be listed. In this case, scan a folder instead of a drive. On Linux, the "dev" and "proc" folder give improper results. Actually all the special files, like character special, socket, etc. 15. Java TinyScan is written in Java with the NetBeans IDE. It uses the Swing API. C. And more16. To doIn any order: - Opening a file/folder when double-clicking. - Saving in Unicode. This would allow for Chinese or Russian characters for example. - Visual track changes in the tree. - Scanning a web site to display its structure. 17. License Open source, BSD license. 18. Credits Author: Thierry Salmon. Design contributions and many suggestions: Yves Vostier. Some suggestions: Eric Salmon, Jean-Philippe Noël, Frédéric de Loneux and Oleg Rezabek. 19. Home Page http://tinyscan.sourceforge.net Voilà. |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ©2009 Thierry Salmon |