Finding files created 1 hour before or 1 hour after a particular file (for example fileX) has been created? What would be an efficient way to do this?
Hello All,
I am not well-versed with Unix commands.
I am tasked with trying to find a way to download zipped logs from a remote server. There are quite a bit of these logs and they are constantly created.
I do have limited ssh access to the remote server and can scp or rsync the files.
However, due to the sheer size of these logs file, I do not want to rsync all of them.
Hi,
I have a folder with hundreds of text files with filenames of the form hhmmSkz.txt were hh and mm correspond to the hour and minute in which the file was generated and S is the string part of the name that has elements k and z that change from file to file.
I need to put together all the files that correspond to the same hour.
Hi,
I have a folder structure as follows,
DATA -> 2012-01-01 -> 00 -> ABC_2012-01-03_00.txt
-> 01 -> ABC_2012-01-03_01.txt
-> 02 -> ABC_2012-01-03_02.txt
...
-> 23 -> ABC_2012-01-03_02.txt
-> 2012-01-02
-> 2012-01-03
So the dir DATA contains the above hierarchy,
User input Start and End Data
I want to grep on all those files between the input dates:confused:, I
Hi All,
I am listing the files which are 4 hours older. For this first I have creted a dummy file with the 4 hours before timestamp, then I am using the below find command,
find /path/ -type f ! -newer 4_hours_oledr_file -exec ls -lrt {} \;
I am getting the files which are older than the four hours only.
I created dir test, created a file 1.txt in the test. dir, wrote 'Before' in this file.
then I went
cd ..
used the command
tar-cvzf ./test.tgz ./test
Then I entered the test dir again. Opened the 1.txt file again. Changed content to "After". I saved the file and changed chmod to read only by executing:
chmod -w ./1.txt
So for now my 1.txt is read only.
I'm trying to get rsync just to sync files that have changed and or been created since it's last run. This is an attempt to stop my NAS servers disks from spinning up every time rsync runs even when there is no file to copy across.
I'm assuming the easiest way to set the time of the last run is to touch a markerfile. That I can do.
Hi,
I have used this
Code:
find .