Use this tag for questions about file management and operations on files.

learn more… | top users | synonyms (1)

2
votes
2answers
130 views

How to generate folder ownership lists for each user?

I'd like to generate several separate lists for each user in Ubuntu. The lists contains the files and folders belong to each user. Using the command following list me all the users in the system: ...
4
votes
2answers
9k views

executing binary file: file not found

I know there are similar questions out there, but I haven't found a solution nor this exact case. The binary was built on Arch Linux using its GCC 4.7. The package works fine on the build system. The ...
14
votes
6answers
6k views

Which extension to use for text files? (Unix/Linux)

I noticed that I can read text files without an extension .txt just fine. How come? Should I save these files with or without the .txt extension? Also, what about .ini files? I usually use them like ...
3
votes
1answer
134 views

How can I dynamically switch the output destination of a script or command?

I ran a shell command the other day which produced more output than expected. It was writing to a file on a filesystem with very little available space and could have filled the filesystem. The ...
4
votes
1answer
13k views

Find a file in lots of zip files (like find command for directories) [duplicate]

Possible Duplicate: Find recursively all archive files of diverse archive formats and search them for file name patterns I need to search for a file in all zip files in a directory. Is ...
1
vote
1answer
497 views

rename files maching specific mtime value within directory

I use simple set of shell commands to in order to create mysqldumps daily. The script is called by cron daemon. It looks like: presentdate="`date +%d-%m-%Y_%H:%M.%S`" basedir="/var/db_my_backup" ...
3
votes
2answers
88 views

Technology / program selection for picture viewing software

I want to learn some Binux usage and/or programming skills and provide an easy to use browser based picture gallery on my local home network. My idea is to have a server machine, that is the Linux ...
1
vote
2answers
400 views

Remove oldest folders + files (50GB) from a folder when share/HD reaches 95% full capacity

I have a big share (~5TB) that is getting full. Now I want to make a script that deletes data from 2 specified folders. But this need to be the oldest files/folders and it need to stop when ~50GB has ...
2
votes
3answers
2k views

How to merge output of two running log files in real-time

I have been analysing how a Linux USB driver works using two disparate methods: examining the output of usbmon, which is a hex dump-ish view of what's being sent "on the wire". adding printk() ...
10
votes
5answers
474 views

What Windows-related files are valueless to *nix users?

I have accumulated, from my time using Windows a good quantity of held-over filesystem copies and archives of system and data drives. I am trying to distill them down to the usable parts while ...
5
votes
1answer
2k views

Are there alternatives for `dd`?

What other tools should I use to read and write files with truncation, seeking and skipping. dd's command line options seem inconvenient and foreign and I don't like choosing between slow, but precise ...
6
votes
2answers
139 views

How can I substitute into this shell command?

I have a find command that I want to substitute a list of GIDs into. Here's the command: find / -follow \( -group 39 -o -acl_group 39 \) -exec ls -ln {} \; 2> $HOME/error.39.log 1> ...
2
votes
1answer
2k views

single bind mounted file gets out of sync in linux

I am bind mounting a single file on top of another one and after making changes with an editor, I don't see the modifications in both files. However, if I make the changes with the shell using ...
5
votes
3answers
702 views

chown not permitted, but I have write access. How can I take recursive ownership?

Consider the following scenario: I have rwx access to a directory as a member of the group id of the directory. The system admin does not let users run chown (see this thread for details) How can ...
9
votes
2answers
2k views

How to check if two directories or files belong to same filesystem

What's the best way to check if two directories belong to the same filesystem? Acceptable answers: bash, python, C/C++.
11
votes
5answers
11k views

How to copy directories with preserving hardlinks?

How to move directories that have files in common from one to another partition ? Let's assume we have partition mounted on /mnt/X with directories sharing files with hardlinks. How to move such ...
1
vote
2answers
300 views

Open-Source Audio Playlist 'Standard'

I know there are quite a few types of audio/music playlists out in the wild. Are there any that are specifically approved as FLOSS? That is, are there are that are particularly encouraged by the ...
8
votes
3answers
3k views

File is mysteriously empty. Options to recover?

I have seen several posts about recovering deleted files, but this situation is different. My wife had a file called Journal.odt in which she kept a lot of important personal information such as ...
2
votes
5answers
3k views

Tools to visualize file size distributions [duplicate]

Possible Duplicate: How to understand what's taking up space? Are there any tools in Linux for graphically visualizing the distribution of file sizes under a given path? I am looking ...
7
votes
3answers
6k views

vi/vim, how can I write out a number of lines to a new file

I have a bunch of lines that I want to write out to a different file. How can I do that?
7
votes
4answers
7k views

Renaming a bunch of files with date modified timestamp at the end of the filename?

So, say, I have a directory with a bunch of files like g.txt, where g.txt was last modified on, say, June 20, 2012. How would I batch-rename all of the files (like g.txt) with the last modified date ...
4
votes
2answers
525 views

Group ID 501 cannot be found

A file in a directory has a Group ID "501" After checking /etc/group, Group ID "501" was not found how is that possible ?
5
votes
1answer
124 views

How to list sample of files from a directory

I have a directory that contains hundred thousands of files. I need to list sample of these files (example 10 files), without processing all the files found in the directory which will take too much ...
18
votes
1answer
22k views

How to skip “permission denied” errors when running find in Linux? [duplicate]

Possible Duplicate: How do I remove “permission denied” printout statements from the find program? When I run this command in Linux (SuSE): find / -name ant I get many error ...
8
votes
1answer
2k views

Does inotify fire a notification when a write is started or when it is completed?

Imagine two processes, a reader and a writer, communicating via a regular file on an ext3 fs. Reader has an inotify IN_MODIFY watch on the file. Writer writes 1000 bytes to the file, in a single ...
8
votes
2answers
981 views

How do I append text to a write protected file [duplicate]

Possible Duplicate: Redirecting stdout to a file you don't have write permission on I am trying to append a line of text to a write protected file. I tried to accomplish this with sudo ...
3
votes
3answers
1k views

How to delete a file with multiple colon signs in its name?

I have a folder with so many files whose name has multiple colon signs. For example: Mail::Message::Field::Full.3pm.gz. I wonder how to delete them. I have tried rm ...
3
votes
2answers
14k views

Display a file's history (list of users that have modified a file)

Is there a command to display a list of users who modified a file providing a file history? I know that possible with svn/git etc.. but we have a config file that is not in SVN and someone modified ...
1
vote
1answer
422 views

wdfs mount problem

I'm running Fedora/Gnome 3.4.2 64bit and I'm trying to mount a webdav file system to work with. As root, I run the command #mkdir /mnt/webdav #wdfs https://www.webiste.com:port/directory ...
14
votes
2answers
3k views

What happens when you read a file while it is overwritten?

Suppose I read (cat) a file while another process is rewriting its contents. Is the output predictable? What would happen?
12
votes
5answers
18k views

Find the total size of certain files within a directory branch

Assume there's an image storage directory, say, ./photos/john_doe, within which there are multiple subdirectories, where many certain files reside (say, *.jpg). How can I calculate a summary size of ...
1
vote
3answers
5k views

Changing file associations in GNOME?

This blog post talks about how to change the default application to handle a file type in Nautilus for individual file types (right-click on the file, "open with", and select the new default ...
2
votes
3answers
2k views

How do I mass-convert the “last modified” dates in a particular directory?

For example, say, I know that my time-offsets are off by several hours (perhaps because my system clock was a few hours ahead at a certain time). In that case, how would I mass-change the "last ...
7
votes
1answer
6k views

How to change the default program for a specific file extension system-wise in kde or xfce?

I'd like to have certain file extensions to be opened with some specific programs. What are the files the edit ? I have found in /usr/share/appplications/default.list but it doesn't work.
-8
votes
3answers
211 views

File name in file system [closed]

I have a strange question about file system in Unix. Why isn't it possible to give the same name to two files under same directory ? Wouldn't it be possible to use IDs to differentiate between ...
5
votes
6answers
3k views

Strange case: Text file that exist and doesn't exist

I'm completely puzzled about a problem with a single plain text file in my system fedora 12. I used a known software in bioinformatics, maker, to produce lots of plain text files and one of them it ...
0
votes
3answers
502 views

Open file from particular position?

I was wondering, if you had a particularly large file, saying 64 MB, is it possible to figure out the physical hard drive location of the file, and then read bytes from a particular offset into the ...
0
votes
0answers
107 views

Real copy to Android device

When i copy files to the Android phone, they are copied to some cache, but they aren't written. I don't like it, because i don't know what is done. I've tried these methods: copying via thunar file ...
3
votes
3answers
109 views

How to include program which only works with in/out files into a pipeline?

I need to process image with several tools in a pipeline tool1 | tool2 | tool3 | .... It appeared though that one of the tools isn't designed to work in a pipeline and only works in format of ...
2
votes
1answer
210 views

No KDE: how to use strigi to index my files?

I'm not running KDE4 , but how can I use strigi to index my documents manually ? I already have strigi installed , but don't know how to utilize it.
3
votes
3answers
6k views

How to find executable filetypes?

I want to find file types that are executable from the kernel's point of view. As far as I know all the executable files on Linux are ELF files. Thus I tried the following: find * | file | grep ELF ...
8
votes
4answers
14k views

Is it possible to compress a very large file (~30 GB) using gzip?

Is it possible to compress a very large file (~30 GB) using gzip? If so, what commands, switches, and options should I use? Or is there another program (preferably one commonly available on Ubuntu ...
2
votes
2answers
377 views

find command for the newest 500 files in a directory tree and also be POSIX compliant

I am looking for a single line shell script or unix command to find the newest 500 files in a directory. Major constraints are it should be POSIX complaint and the directory can have tons of files.
5
votes
1answer
146 views

Can non-canonicalized forms of filesystem paths be significant? (eg. “foo//bar”, “foo/./bar”, and “foo/../bar”)

I have a script for building a particular flavor of GCC cross-compiler. Throughout the script there are many paths that are not in canonical form, such as duplicate path separators (/xxx/foo//bar/yyy) ...
3
votes
2answers
2k views

how to find offset of one binary file inside another?

I have two binary files. One of few hundreds kilos and other of few gigabytes. I want to know whether the whole, smaller, file is contained within the larger one and if so then what is the offset from ...
4
votes
3answers
2k views

Recursively list files with file names, folder names and permission in CentOS

Is there anyway I can list files by typing a command in the shell which lists all the file names, folder names and their permissions in CentOS?
1
vote
1answer
258 views

Reclaiming space from one filesystem to give it to another without LVM

I want to add one file system space to another file system. /dev/cciss/c0d0p2 152358920 143606116 888588 100% /db2 /dev/cciss/c0d0p15 203899764 50767420 142607764 27% /db2/ade/sapdata1 ...
1
vote
1answer
202 views

Magic file that redirects to standard output

Is there a magic file name that gives the following effect? $ mkfifo /tmp/fifo1 && cat /tmp/fifo1 & $ foo --log-file /tmp/fifo # now I can see the log as the program runs I want ...
3
votes
1answer
443 views

How do I transfer files to a SunOS server via sftp with FileZilla?

According to the admin of the webserver, I should be able to use Filezilla to transfer files to the server but I am getting an error. I set up Filezilla for transferring files sftp - using these ...
9
votes
3answers
390 views

Stacked filesystems with write-back

I need to setup a system where a laptop and a desktop computers coexist. The idea is, I bring the laptop into the network and the laptop syncs the /home directory( with some exceptions) with the ...