The Overflow Blog The second line of each two-line entry displays the total number of blocks and files that are allocated for the file system. Start here for a quick overview of the site

No harm will be done if some is already in UTF-8.

In the Encoding dialog box, select the encoding that the editor should use.

The best answers are voted up and rise to the top

See the following example. As humans we might be able to recognize that a file is a text file with some umlauts in a "wrong" encoding. # (As an alternative to 'lsof command') Tested on Solaris 9 # I take a NetBackup process as example: root 1915 1 0 oct 17 ? Anybody can answer

So you're right...Great !

@kasperd Most likely he is refering to one of the ISO 8859 or Window code page family.

This can have a negative impact on application performance in case a process is very active at the time the pfiles command is run on it. To open an encoded file that is not part of a project. For example, an However, let's get back from explaining what you can't do to what you actually can do:For a basic check on ASCII / non-ASCII (normally UTF-8) text files, you can use the If that is not enough, I can offer you the Python script I wrote for

Logs are rotated using logadm-- a special utility introduced in Solaris …

However, let's get back from explaining what you can't do to what you actually can do: For a basic check on ASCII / non-ASCII (normally UTF-8) text files, you can use the file command. In these cases, it is often useful to know how many files are currently open by a process. But I have many of these and wanted to make small script that would control all of them and then covert if needed. By clicking “Post Your Answer”, you agree to our To subscribe to this RSS feed, copy and paste this URL into your RSS reader.

Perhaps you are thinking of ANSI escape codes, which can be expressed with the ASCII character encoding. The standard "magic" file on 5.3 does not however recognize eg UTF-8 specifically, so you will probably want to copy a more comprehensive one from somewhere else.

Sometimes, the error message “too many open files” is displayed in /var/adm/messages. By using our site, you acknowledge that you have read and understand our Ask Ubuntu is a question and answer site for Ubuntu users and developers.

By counting the number of files in the fd subdirectory of /proc/[PID], the number of open files of the process can be examined quickly.However, according to pfiles man pages, pfiles “stop[s] their target processes while inspecting them and reporting the results”. site design / logo © 2020 Stack Exchange Inc; user contributions licensed under For just checking the number of open files of a process, the following command sequence can be used:The number of files opened by a process can also be checked by examining the contents of directory /proc/[PID]/fd (in this example, /proc/29803/fd):There is one character special file for each open file of that process. When the process is ready to write again, it writes to the original name, thus creating a new file. Featured on Meta Run the sleep 120 seconds command in background and then run pfiles command on the PID of the sleep command.

See the following example. The number of files currently opened by a certain process can be examined by:The pfiles command displays the current limit of the number of open files for the process and more information about all currently open files of that process. First I require to identify the file's encoding, and only when its UTF8 encoded, then check whether it has BOM or not. If the file was open at the time of the rename, the process continues to finish the write operation before closing the file descriptor. Example 13-3 Displaying Total Number of Blocks and Files Allocated for a File System.

The file command has no idea of "valid" or "invalid".

It does not know many codecs though and it only examines the first few kB of a file, …