For questions concerning the generic use of computer files.

learn more… | top users | synonyms (1)

137
votes
5answers
85k views

Notepad++ is unable to load langs.xml, why?

Whenever I open NotePad++ the following error message appears: --------------------------- Configurator --------------------------- Load langs.xml failed! --------------------------- ...
100
votes
18answers
6k views

What's the quickest way to count the number of each character in a file?

I want to count the A's T's C's G's N's and "-" characters in a file, or every letter if needed, is there a quick Unix command to do this?
58
votes
3answers
3k views

Why do some downloading files not know their own size? [duplicate]

Occasionally, when downloading a file in a web browser, the download progress doesn't "know" the total size of the file, or how far along in the download it is -- it just shows the speed at which it's ...
55
votes
2answers
70k views

Easy way to find out which process is locking a file or folder in Windows? [duplicate]

Possible Duplicate: How do I delete a ‘locked’ file? How can I find out which process is locking a file or folder in Windows? For instance if you are trying to delete a folder ...
53
votes
10answers
74k views

Linux: How to move all files from current directory to upper directory?

I tried something like mv . .. but it doesn't work.
46
votes
5answers
33k views

How to copy with cp to include hidden files and hidden directories and their contents?

How can I make cp -r copy absolutely all of the files and directories in a directory Requirements: Include hidden files and hidden directories. Be one single command with an flag to include the ...
45
votes
2answers
10k views

How to append to a file as sudo? [duplicate]

Possible Duplicate: sudo unable to write to /etc/profile I want to do: echo "something" >> /etc/config_file But, since only the root user has write permission to this file, I can't ...
44
votes
11answers
58k views

How can I identify what application is using a given file?

I'm trying to delete some folder but this error is preventing from doing it: Cannot delete [FileName]: It is being used by another person or program. Close any programs that might be using ...
39
votes
19answers
64k views

How can I mass rename files from the command line or using a 3rd party tool?

I've got a bunch of files named with a the pattern 99 - DescriptiveName.txt and I'd like to remove the number from the front so I just have DescriptiveName.txt. How can I do this? Can I do it from ...
39
votes
8answers
13k views

How do I delete a 'locked' file?

On Windows XP, When I try and delete a specific file it says : Cannot delete blah.blah: Make sure the disk is not full or write-protected and that the file is not currently in use. How can ...
39
votes
3answers
57k views

How to make new file permission inherit from the parent directory?

I have a directory called data. Then I am running a script under the user id 'robot'. robot writes to the data directory and update files inside. The idea is data is open for both me and robot to ...
37
votes
0answers
2k views
36
votes
5answers
28k views

Recursively count all the files in a directory [duplicate]

Possible Duplicate: How can I count the number of folders in a drive using Linux? I have a really deep directory tree on my Linux box. I would like to count all of the files in that path, ...
36
votes
3answers
56k views

How can I determine what process has a file open in Linux?

I'd like to determine what process has ownership of a lock-file. The lock-files are simply a file with a specific name that has been created. So, how can I determine what process has a particular ...
35
votes
10answers
68k views

How to recover a removed file under Linux?

By accident, I used rm on a file I didn't want to delete. Is there a way that I can get it back under Linux?
33
votes
9answers
43k views

How to delete a file in Windows with a too long filename? [duplicate]

Possible Duplicate: Tool for deleting directories with path/names too long for normal delete My wife has several files and folders that somehow ended up having filenames that have caused ...
31
votes
5answers
2k views

Why is a 7zipped file larger than the raw file? [duplicate]

Possible Duplicate: Why doesn't ZIP Compression compress anything? I tried 7zipping an .exe file but it actually became larger. Is this the expected result?
28
votes
4answers
21k views

How do I find out the file type without an extension? [duplicate]

After recovering my HDD, I ended up with a lot of files with no extension. Many of them are .bin files. Is there any way to find out what file format they actually are? Many of them have no ...
27
votes
4answers
2k views

How to create a file which is named like a command line argument?

I was wondering how to make a file named as a flag, e.g., if I wanted to make a folder named -a, what commands would do the trick? I tried mkdir '-a', mkdir \-a, and neither worked. I'm on Ubuntu.
27
votes
2answers
14k views

Is there a fix for the “Too many open files in system” error on OS X 10.7.1?

I need to get rid of the pesky "Too many open files in system" limit on OS X 10.7.1.  Is there a way?
26
votes
13answers
5k views

Best way to *confidently* search files and contents in Windows without using an indexing service?

Back in Windows XP I knew that doing a file search and checking "Search file contents" (or whatever it was) I would get my results if I waited patiently. In Vista, I felt I had absolutely no ...
26
votes
4answers
31k views

How can I find files that are bigger/smaller than x bytes?

In a terminal, how can I find files that are bigger or smaller than x bytes? I suppose I can do something like find . -exec ls -l {} \; and then pipe the result to AWK to filter by file size. But ...
26
votes
5answers
36k views

Bash script to delete files older than x days with subdirectories

I'm trying to delete a ton of files older than x days. Now I have a script to do that find /path/to/files* -mtime +10 -exec rm {} \; But this will also delete the subdirectories. There are a ton ...
25
votes
5answers
12k views

What does the ~ mean in a file path?

What does the ~ mean in an absolute file path? I see this in the output of things like build scripts but the path does not exist.
24
votes
10answers
12k views

How to Remove the Last 2 Lines of a Very Large File

I have a very large file ~400G, and I need to remove the last 2 lines from it. I tried to use sed, but it ran for hours before I gave up. Is there a quick way of doing this, or am I stuck with sed?
23
votes
4answers
5k views

How to lock a file against deletion but still make it writeable?

I want to make a file locked against deletion but still be writeable. How do I do this? The file in question is a truecrypt volume as a file on a NAS SMB Network share, so I don't want to ...
23
votes
6answers
26k views

Batch-convert files for encoding

How can I batch-convert files in a directory for their encoding (e.g. ANSI->UTF-8) with a command or tool? For single files an editor helps, but how to do the mass files job?
21
votes
22answers
11k views

What's a good alternative to Windows' “Search for Files and Folders”? [closed]

The built-in Windows Search tool will apparently not search within PHP files. I cannot find the files named *.php containing text "some_function_name" that I know are there. Search is complete. ...
21
votes
6answers
24k views

'No such file or directory' error in bash, but the file exists?

On Ubuntu, I get a 'No such file or directory' error when I try to execute a command. I have checked with 'ls -la' , the file 'adb' is there and it has 'x' flag So why I am getting a 'No such file ...
21
votes
0answers
5k views

Tool to determine what has locked a file [duplicate]

Every once in a while when I try to remove a file I have been working with, Windows tells me I cannot remove it, because some application is still using it. Sometimes it's just my own stupidity, and ...
20
votes
7answers
3k views

What does the @ mean on the output of “ls” on OS X' terminal?

When doing an ls in a directory I get the following output: drwxr-xr-x@ 12 xonic staff 408 22 Jun 19:00 . drwxr-xr-x 9 xonic staff 306 22 Jun 19:42 .. -rwxrwxrwx@ 1 xonic staff 6148 25 ...
19
votes
5answers
6k views

How to keep only every nth line of a file

I've got a rather sizable CSV file (75MB). I'm just trying to produce a graph of it, so I really don't need all of the data. Rewording: I'd like to delete n lines, then keep one line, then delete n ...
19
votes
3answers
1k views

Can Double Zipping Cause Problems?

I have a directory that I have been storing a ton of files in. Among the 10ish types of files there are also .ZIPs of other directories. In my personal experience I vaguely remember issues when ...
18
votes
7answers
243k views

How can I copy a DVD to another DVD using a single DVD drive?

I need to copy a DVD to another DVD, but I have only a single DVD drive. How can I accomplish this? I tried copying files to the desktop and then to another DVD. It didn't work out.
17
votes
17answers
103k views

How to download a URL as a file?

A website URL has "hidden" some MP3 files by embedding them as Shockwave files, as follows. <span class="caption"><!-- Odeo player --><embed ...
17
votes
3answers
10k views

What is the difference between size and size on disk?

Looking at the properties for a windows file I get two attributes, Size & Size on disk and Size on disk is always larger. What do these two metrics mean?
17
votes
3answers
3k views

How can I save the current contents of less to a file?

If I've piped the results of a command to less and then decided that I want to save the contents to a file, is this possible? I've tried setting a mark a at the end of the buffer, and then returning ...
17
votes
2answers
728 views

What does the trailing “+” mean in file permission bits in Linux?

I used ls -a to list a file and got the following information: sqyang@intel4-88: ls -a 123 -rwxr-xr-x+ 1 root lsf 16845584 Nov 25 21:38 123* The file permission part is -rwxr-xr-x+. What does the ...
16
votes
2answers
22k views

How to get file/folder size with SSH on linux?

I am using SSH to connect to a CentOS server and I want to get the file in mb of some files and folders, how can I do it?
15
votes
2answers
3k views

Why is it so hard to find a file in Ubuntu?

It's very hard to find files in Ubuntu. In Windows, you could just go to C:\Program Files and you would find what you need. In Ubuntu, you must use search to find something you need. Maybe I am ...
15
votes
3answers
36k views

Set file permissions so that new files inherit same permissions [duplicate]

I have a folder in which new subfolders and files will be created automatically, by a script. I want to maintain the user and group permissions recursively for all new folders and files placed in the ...
14
votes
1answer
64k views

What are “reparse records”?

My computer just did a chkdisk, and when it finished processing file records, it said it had processed 44 reparse records. What exactly are they?
14
votes
1answer
539 views

How to recover a deleted file that is still open?

How can one restore a file that has been deleted but is still open by a process? The blog post "Restoring files from /proc" explains how to do this on Linux: Use lsof (e.g., lsof -c name) to find ...
13
votes
6answers
2k views

What is the most reliable way to send a big file between two Windows computers via network? [duplicate]

The file is around 170GB. I wouldn't upload it on the FTP, and download it. It is not reliable, sometime, connections drop, and it will have big trouble. So, is there any better way to do so? Anyone ...
13
votes
9answers
19k views

Windows equivalent of the Linux command 'touch'?

What do you use when you want to update the date-modified field of a file on Windows? commands accessible via C++, .NET, C#, or something native to Windows (Vista preferably) tools/applications ...
13
votes
20answers
7k views

What editor/viewer to use to inspect large text based files? [duplicate]

Possible Duplicate: Text Editor for very big file - Windows Are there any text editors/viewers (preferably on windows but other platforms are also ok) that can handle files of 500 MB or ...
13
votes
1answer
10k views

How many files can a windows folder contain?

How many files can a windows folder contain? This question is asked here but then the question text pollutes the question with issues of "rules of thumb" So to be clear, this question is: How many ...
13
votes
1answer
11k views

How do file permissions apply to symlinks?

Let's say you have this structure: + directory -- file1 -- file2 -- file3 -> /tmp/file3 file3 is a link to another file3 somewhere else on the system. Now let's say I chmod 777 the directory ...
12
votes
3answers
9k views

How to purposefully exclusively lock a file?

I want to hold an exclusive lock on a file so it cannot be read or written by anything else. Is there a simple Windows tool or command to do this? I suppose the tool or utility would implement the ...
12
votes
3answers
10k views

Why can't I edit a “Program Files” file on Windows 7?

I'm having trouble editing this file on Windows 7: C:\Program Files (x86)\CMake 2.8.7\share\cmake-2.8\Modules\FindJNI.cmake If I edit it in Cygwin (vi) or TextPad, those two programs see the ...