archive

Update zipfiles with PowerShell 5 or >. Working code looking for improvement

[亡魂溺海] 提交于 2020-05-16 04:05:31
问题 Windows 10 64-bit. PowerShell 5.1 Update zipfiles with PowerShell 5 or >. Working code looking for improvement. 1.1.txt, 1.1.3.txt and 1.txt go in FileGroup0000000001.zip 11.txt and 11.1.txt goes in FileGroup0000000011.zip 2.1.3.6.txt, 2.1.3.6.7.txt, 2.1.txt, and 2.txt go in FileGroup0000000002.zip Update zipfiles with PowerShell 5 gci, regex, $Matches, foreach {$_ PadLeft}, Compress-Archive, and Remove-Item . Avg 29ms 9 files (48KB) 3 archives on ten runs. For testing clear your desktop.

Scripts traversing through directories looking for specific set of files and folders

跟風遠走 提交于 2020-03-25 17:34:45
问题 I'm trying to create a script that will traverse through all folders and subfolders of rootDir looking for specific set of folders and files. If script will find the folder (for ex. testfolder1 ) in which there are: textfile.txt image.jpg (optionally) subtitles.dxfp another folder (ex. testsubfolder1 ) containing video.mp4 file (optionally) another folder (ex. testsubfolder2 ) containing video_trailer.mp4 file it will create archive containing textfile.txt , image.jpg , subtitles.dxfp (if

nodejs 批量压缩文件或文件夹

蓝咒 提交于 2020-03-07 10:21:56
/** * Created by Administrator on 2017/6/9. */ var fs = require('fs'); var archiver = require('archiver'); var path=__dirname; var dirList = fs.readdirSync(path); var status=true; dirList.forEach(function(item){ console.log(item); // create a file to stream archive data to. var output = fs.createWriteStream('F:\\work\\wxapp\\input\\'+item+'.zip'); var archive = archiver('zip', { zlib: { level: 9 } // Sets the compression level. }); // listen for all archive data to be written output.on('close', function() { console.log(archive.pointer()/1024/1024 + 'M'); console.log('压缩完成'); }); // good

Mysql - Archiving data, which solution to use?

被刻印的时光 ゝ 提交于 2020-03-05 11:01:12
问题 I am using MySQL 5.x and there is one main table that has the stats combined for all customers. I would like to run reporting on it but dont want to run it on the same table so Im thinking of every night moving the data to a different table that will only be used for reporting. My question is would it be beneficial to have a seperate table for each customer to archive too or just have it just one archive table for all customers? There could be thousands of customers in the system which could

standby会同步target日志文件

偶尔善良 提交于 2020-03-01 16:53:56
SQL> execute sys.dbms_backup_restore.resetCfileSection(11); #清空归档日志记录文件,便于查看 PL/SQL procedure successfully completed. SQL> select name,sequence#,applied from v$archived_log order by sequence# ; no rows selected SQL> archive log list Database log mode Archive Mode Automatic archival Enabled Archive destination +ARCH Oldest online log sequence 97 Next log sequence to archive 98 Current log sequence 98 SQL> alter system switch logfile; #切换归档会同时写入到本地和远程stand归档路径 System altered. SQL> select name,sequence#,applied from v$archived_log order by sequence# ; NAME SEQUENCE# APPLIED ----------------------

Summary Blog Links

廉价感情. 提交于 2020-02-15 13:52:03
Useful Work Site Link: SharePoint Update: http://technet.microsoft.com/en-US/sharepoint/bb735839 Troubleshooting SPSite/SPWeb leaks in WSS v3 and MOSS 2007: http://blogs.technet.com/b/stefan_gossner/archive/2008/05/07/troubleshooting-spsite-spweb-leaks-in-wss-v3-and-moss-2007.aspx?PageIndex=4#comments sharepoint 2007 error in logfile "There is no web named": http://social.technet.microsoft.com/Forums/en/sharepointadminlegacy/thread/9aebee53-e6a8-4db6-a9c3-317c16c86897 "Save site as template" option and the publishing feature : http://blogs.technet.com/b/stefan_gossner/archive/2007/09/19/save

Go语言实现冒泡和快速排序

房东的猫 提交于 2020-02-11 04:08:38
冒泡和快速排序都属于交换类排序,所谓交换排序是指借助数据元素之间互相交换进行排序的方法。 冒泡排序法 冒泡排序法是一种最简单的交换类排序方法,它是通过相邻数据的交换逐步将线性表变成有序。 冒泡排序(BubbleSort)的基本概念是:依次比较相邻的两个数,将小数放在前面,大数放在后面。 即在第一趟:首先比较第1个和第2个数,将小数放前,大数放后。然后比较第2个数和第3个数,将小数放前,大数放后,如此继续,直至比较最后两个数,将小数放前,大数放后。至此第一趟结束,将最大的数放到了最后。 在第二趟:仍从第一对数开始比较(因为可能由于第2个数和第3个数的交换,使得第1个数不再小于第2个数),将小数放前,大数放后,一直比较到倒数第二个数(倒数第一的位置上已经是最大的), 第二趟结束,在倒数第二的位置上得到一个新的最大数(其实在整个数列中是第二大的数)。如此下去,重复以上过程,直至最终完成排序。 由于在排序过程中总是小数往前放,大数往后放,相当于气泡往上升,所以称作冒泡排序。 参考: http://baike.baidu.com/view/254413.htm 图来自: http://www.cppblog.com/guogangj/archive/2009/11/13/100876.html Go 语言实现 fund BubbleSort(values[]int){ flag:=true

Archival filesystem or format

≯℡__Kan透↙ 提交于 2020-02-03 05:13:23
问题 I'm looking for a file type for storing archives of systems that have been decomissioned. At the moment, we primarily use tar.gz, but finding and extracting just a few files from a 200GB tar.gz archive is unwieldy, since tar.gz doesn't support any sort of random-access read provision. (And before you get the idea, mounting a tgz using FUSE doen't make it better.) Here's what we've found so far -- I'd like to know what other options there are: tar.gz -- poor random-access read zip -- lacks

renaming file name inside a zip file

那年仲夏 提交于 2020-02-02 10:22:11
问题 trying to rename internal file within a zip file without having to extract and then re-zip programatically. example. test.zip contains test.txt, i want to change it so that test.zip will contain newtest.txt(test.txt renamed to newtest.txt, contents remain the same) came across this link that works but unfortunately it expects test.txt to exist on the system. In the example the srcfile should exist on the server. Blockquote Rename file in zip with zip4j Then icame across zipnote on Linux that

SQL / Windows OS releasing unused space

一曲冷凌霜 提交于 2020-01-30 12:27:05
问题 I have recently done some archiving of my data, and performed the following: I had a database table that had over 33 million records, many of which were duplicates. I backed up the table and inserted the unique data into a new table, then renamed/swapped the table names, this achieved what I needed. Now however I am left with two tables... Table1 (good/live table) - 10 million records Table1_Backup (backup table) - 33 million records After doing this my SQL mdf/data file has rose to 319.7 GB,