Its an web application, statement generation & reporting system dealing in huge numbers upto terabytes data. in this application we are using shell scripting for creating password protected zip file. When we tested this application on our development Server it is working fine. This script or zip file creation command are working properly for some server but not working on another server with similar hardware and OS. If we use file with huge sizes or folders (having more than 400 files) in that case this command failed. any pointers plz?
Some file systems have limits on the size of files (usually 2Gb or 4Gb) and even the number of files in a directory. It might be worth looking at what the underlying file systems are on the working and non-working servers, to see if there's a pattern.
Related
I'm working with a scriptable CAD/CAM system that runs on Windows 10 whose built-in code pane is not very useful. The user-defined scripting code for this CAD/CAM system is not saved in text files, but rather, in a field in an SQL Server. I'm thinking there might be some way of setting up Visual Studio/VSCode (or maybe Notepad++) to work with the code in the database the same way it would do if were in a text file. I could probably set up some sort of .Net FileSystemWatcher utility that keeps a bunch of code files it sees in a directory synched with code in the SQL Server data field. But I have deadlines, and I'm supposed to be scripting this CAD/CAM system--not building tools to script the CAD/CAM system. Any ideas for a "quick fix"?
I'm a newbie on linux and I was planning to use logrotate so that my log files which generate inside a radio file system, would not getting larger size and cause any memory issue.
but as can see from below, this configuration is set at logrotate.conf file in linux, then I am confused and wonder is it possible to add this thing as a "coding style" in my C files so that it work on my radio which is running Linux system.
The radio don't have this logrotate thing under /etc/logrotate.d path after all. I also unable to install any logrotate or execute the command "man logroate", it tells : no manual entry for 'logrotate'.
/var/logs/*.log {
hourly
missingok
rotate 24
compress
create
}
Can it be called like normal function such as fclose() or fopen() in .C files?
If it can be used in C files, what is the correct way to configure the parameter?
I think you misinterpreted how logrotate work: It only work with files created by service/application on host machine.
For example on your linux machine you are running mailing server postfix (base on config you posted):
Postfix service filling log file /var/log/postfix.log
Logrotate take every hour postfix.log and create compressed file postfix.1
Increment number of already existing archive files
Logrotate keep 24 compressed files (= 1 day)
In you case you have to setup application logging to save log files and then you can apply logrotate to it.
Logrotate man page can be found here
I am currently creating a small process that will download any new or updated file from an FTP(not SFTP) location to a local drive. I have written a small batch script along with WinSCP, but it takes FAR too long. There are around 200k files and 16k folders on the FTP. It takes just under an hour to check every file and folder, not including any time downloading any new/updated file. From what I understand, WinSCP compared file modification dates of every single file and folder, which is why it takes so long. I'm not sure where to go from here.
I am using WINDOWS 10.
Is there a better way to go about synchronizing these? Possibly check FTP drive if anything has been changed, if so, find the change and download it? Will post pics of batch if needed.
Thank you!
Whenever I open one of the Quantum Grid demos in Delphi XE Pro (on Windows 7 32-bit), the following error is displayed for every table (I think) in the project:
error message http://www.tranglos.com/img/qgerror.png
The message is:
Network initialization failed.
File or directory does not exist.
File: C:\PDOXUSRS.NET
Permission denied.
Directory: C:\.
I understand permission issues writing to c:\, but the result is that while I can build and run the demo projects, no data is displayed, which makes the demos rather useless. And what kind of database writes its configuration to c:\ directory in the 21st century anyway? :) (Yes, I know very little about Paradox databases, but I won't ever be using one either. I just want to learn how to use the grid.)
Using BDE Administrator I've tried changing the Paradox "NET DIR" value to a folder with write permissions on the C drive. Result: now the database tables cannot find their data:
Path not found.
File: C:..\..\Data\GENRES.DB.
...and the unhelpfully truncated path gives no indication where the files are expected to be.
Is there a way to work around the problem so that the demos can load their sample data correctly?
Did you install the BDE correctly? It should use the DBDEMOS files. Do you see such an alias in the BDE administration utility? Can you open that database in one of the Delphi demos?
The BDE is not a XXI century database, it was developed twenty years ago and never upgraded lately. It's an obsolete tecnology, but because it comes still with every release of Delphi with a known database it is still often used in demos because nothing new has to be installed.
Anyway that file is not its configuration file. It's a sharing lock file to allow more than one user to use the database concurrently. Because it is a file based database without a central server, it has to use such kind of shared files. Usually its position is changed to a network share, but it defaults to C:\ for historical reasons.
Anyway it's not only the BDE still attempting to write in the prong directories. I still see a full bunch of applications attempting to write to C:\ (especially logs) or other read-only positions.
Using BDE Admin to change the location for PDOXUSRS.NET helped, but it wasn't sufficient. DevExpress did the right thing in specifying a relative folder for the data location, and the relative folder seems perfectly allright, but for some reason the DB can't find it.
Solution: under the \Demos\ folder find all the *.dfm files that contain the string
..\..\Data
and replace that string with the absolute path to the demos folder. That done, all the demos open correctly.
I know this message from our own applications. It has to do with security measures introduced with Windows Vista. The operating system trying to protect critical files denies access to them. There is a method how to bypass this mechanism without compromising security. Try to run your application in compatibility mode. When application is running in compatibility mode, read / write operations from / to system folders are redirected to "safe" directories located in C:\Users[Current User]\AppData\Local\VirtualStore.
More info on http://www.windowsecurity.com/articles/Protecting-System-Files-UAC-Virtualization-Part1.html.
I have started coding an FTP client application (for fun). I’m trying to represent remotely hosted files with icons. For example, let’s say I’m browsing the root folder of an FTP server (/) and want to display the Backup.zip file with the icon association from that client operating system. On some systems, this may be the windows compression icon and other operating systems this may be WinZip or WinRAR icons.
I have the client browsing local files with the SHGetFileInfo() function. This works great with files that are local, however, this function requires the physical file in order to retrieve the associated icon. So, this will not work with remotely hosted files. I have found some samples of loading icons given a file extension, and this is really where the question comes in... What would be the best strategy to get icons associated to remote files?
Go to the registry every time and look up extension to icon associations
Create 1 byte files with each extension and use the SHGetFileInfo() function for remote files (using local 1 byte files as association for remote files)
Other strategies???
What would a professional software company creating an FTP client do?
Thank you for your time.
-Jessy Houle
I suggest that you don't go to the registry every time: go if you need to, but if you've already been for a given filetype then remember/cache that result (within your program) and reuse it.
Use the procedure here from a previous Stack Overflow question on the same idea and uses the registry instead of an actual file.
How can I get the filetype icon that Windows Explorer shows?