2
votes
1answer
1k views

How to get actual creation time of a file on Unix?

I'm inspecting some files in my dedicated web server via linux cli after a hack attack and found some files have been modified with the 'touch' command to change the dates. I'm willing to get the ...
0
votes
1answer
199 views

Prevent mv from overwriting the larger file by the same name

I need to move all files from a directory, discarding the directory structure. Unfortunately, some files have the same file name (Thumbnails). I'm looking for smth. like this: find /tmp/dirtree ...
0
votes
1answer
68 views

Count amount of disk space needed by files bigger than x

In Linux, I know I can use find ./ -size +1M to find files which are bigger than 1M, but how do I sum the total space needed by these files?
1
vote
2answers
89 views

locate similarly named files

I'm running OS X 10.7.3. I would like to locate all the files that have common strings in their filenames. I have a folder that contains several files whose filenames are the same except for the ...
11
votes
2answers
11k views

Unix: How to merge two directories

Say I have two folders with various content, foo and bar. How can I merge bar into foo so that: Files in foo that are not in bar are untouched. Files in bar that are not in foo are now in foo. Files ...
3
votes
2answers
5k views

How do I close a file that I created using cat > command?

I learning how to use git on a Mac and I'm trying to add a file in one of my branches by using the "cat > " command. The problem I'm having is that I want to end editing the file in the terminal but I ...
0
votes
1answer
446 views

Monitor changes to a directory tree without root access

I had an incident recently where some files were accidentally deleted. These are files on a shared webhosting account (FreeBSD), but the directory tree is deep. My inclination is to write something ...
3
votes
3answers
863 views

Is there a tool on Unix, Linux, Mac, Windows, Ubuntu, that will list file / directory structure?

I wonder if there is a tool that will list file / directory (i.e. take a snapshot of the folder and file structure) like the following: audio mp3 song1.mp3 some other song.mp3 audio books ...
1
vote
1answer
154 views

Removing files with strange names [duplicate]

Possible Duplicate: Unix: Files starting with a dash, - Somehow I ended up with a file named "-r". How do I remove it? rm -r doesn't work. I tried 'rm -i `ls -a`' to step through the ...
1
vote
2answers
1k views

Unix: Search for file contents

I find the find . -name "some-file" command very useful to list all files matching some file name in a folder. Is there anything similar I can use to list all files that contains string? If you ...
11
votes
2answers
10k views

Unix: Is there a way to “copy” file or directory permissions?

I have two files in a directory. One has correct permissions and the other has not. Is there a way I can "copy" the set of permissions from one file to another?
11
votes
2answers
7k views

How to make files created in a directory owned by directory group?

Is there a way, on Linux, to cause all new files created in a directory to be owned by the directory's group instead of the creating user's group?
10
votes
7answers
9k views

Is it better to always copy and delete, rather than move?

Generally speaking, I find myself panicking when I realise that if I cancel a file move, it could cause the target or source to be incomplete. This question applies to Windows and Unix-based ...
4
votes
4answers
9k views

How to move only files in Unix

How can I move only the plain files (not the directories) from one folder in Linux to another folder using the mv command? I have tried mv * ~/, but it copied everything including the directories.