Browsing articles tagged with "files - 2/14 - Admins Goodies"
Feb 10, 2012
tom

how to delete a insane number of files from an unix system?

On a system with linux there are 2 folders with aprox 12gb used(out of 500gb) and all inodes are used by some s Asked by Bogdan Cosmin If you’re on a relatively recent box just using something like find /my/full/directory -type f -delete You can be a little bit more subtle if you want to delete only some of the files by throwing in a pattern match. Don’t use find with xargs and rm, as [...]

Continue Reading »
Feb 7, 2012
tom

What is stored in %Windir%\System32\LogFiles\WMI\RtBackup?

I occasionally notice in Resource Monitor hard disk activity related to ETL files in the folder C:\Windows\System32\LogFiles\WMI\RtBackup. Which process/service creates these ETL files and what is their purpose? Resource Monitor shows “System” as the process which is correct since ETW traces (that is what ETL files are) are created by the kernel. But I am interested in the process that causes the traces to be created. This happens on Windows 7, by the way. Asked [...]

Continue Reading »
Jan 30, 2012
tom

Why am I getting ‘File in use by Another User’ and ‘Application Sharing Violation’ errors when trying to open & and save files?

We’re getting this a lot lately. Windows 2008 Server Windows 7 & Vista Client PC’s Microsoft Office 2007 When a user tries opening a file on our network drive (word doc, excel spreadsheet, etc) the software reports the file is locked by ‘another user’ even when it’s not. They’re also seeing random ‘Sharing Violation’ errors when trying to save files to the network. Possibly the same manifestation of the problem shows up when a user [...]

Continue Reading »
Jan 10, 2012
tom

Bash: checking uniqueness of filenames, and renaming or removing files

I’m working in CentOS with bash and I have files in a directory as follows: 16948.png 16948_thumb.png 16948-1_thumb.png 16949.png 16948_thumb.png 16949-1_thumb.png 16950-1.png 16950-1_thumb.png 16950-2.png 16950-2_thumb.png I would like to do the following: For each unique number N that exists in the list of files: check that there is a file N-1.png: if not, create it by copying N.png to N-1.png (there will always be an N.png) delete the file N.png check that there is a [...]

Continue Reading »
Jan 3, 2012
tom

Is it possible to GET or PUT two specific files at a time using SFTP without wildcard?

From a directory of dozens of files, is it possible to GET or PUT two files at once using SFTP? I do not want to use a wildcard because I don’t necessarily know the names of all the files and don’t want to affect other files. I’m hoping there’s something like: get javascript.gs,stylesheet.css From Google searching and looking on various Stackexchanges, it doesn’t look like this is possible. Does anyone know for sure? you can [...]

Continue Reading »
Dec 19, 2011
tom

Safe way to determine size of a file using unix tools?

I wonder, what’s the best way to determine the size of a file using common unix tools. I need to determine the size of a file in bytes in a shell script. The problem is, that the shell script needs to be portable across different operating systems like osx, irix, linux — that said: using the “stat” command may not work well, because the arguments required to get the result i want are different on [...]

Continue Reading »
Dec 6, 2011
tom

Linux (mv or cp) specific files from a text list of files?

I have a directory of many files, something like 50,000 pdf’s and other files on a server. I need to move specific ones to another directory. I can generate a list of the files that need to be moved either in csv or any other text format. What I need to do is run a bash script and move or copy the files that are listed in the text file to another directory. Is there [...]

Continue Reading »
Dec 6, 2011
tom

getting a list of files from secure server

i am trying to get a list of files from secure server to compare them (using diff) to the ones i modified on local version (unfortunately the company i work in is not using subversion nor git yet) i get list of files easily with: find . -mtime -20 | grep “.php|.js|.css” > changedfiles.log what i need is a script which would loop over this list and secure copy each of them (scp or rsync) [...]

Continue Reading »
Dec 5, 2011
tom

How to distribute files and folders to handle large number of files

I want to manage a huge number of files on my server (say millions). It is needed to save files in two or three levels of folders to keep the number of files in each folder low. On the other hand, it is not good to have many folders to spend inodes. How much is the optimum ratio of files per folder? Is there a theoretical approach to determine this, or it depends on the [...]

Continue Reading »
Sep 23, 2011
tom

Windows Server 2008 + IIS7: .ogg files can not be played

I have the strange trouble. There are .mp3 and .ogg files in the folder of web application in my server (IIS7.5, Windows Server 2008 R2). Web application has flash player. It can play .mp3 only, but it don’t play .ogg-files. Same web application in other server works fine. Have anybody idea? Thanks. Add the OGG MIME type in your web.config. Something like: <configuration> <system.webServer> <staticContent> <mimeMap fileExtension=”.m4v” mimeType=”video/m4v” /> <mimeMap fileExtension=”.ogg” mimeType=”audio/ogg” /> <mimeMap fileExtension=”.oga” [...]

Continue Reading »
Pages:«1234567...14»