Gnuplot: performance drop chart at the end of the day - performance

have only one column, else column be some count of items (timestamp's) from pre-set period(ex 5min, 10 20 30 60),
//x - time in case static grid, y - count(x.join(period))
how to draw an intensity curve of the occurrence of time point values
timestamp.csv:
timestamps_col
13.11.2019 15:42
13.11.2019 15:43
13.11.2019 15:45
13.11.2019 15:47
13.11.2019 15:48
13.11.2019 15:51
13.11.2019 15:51
13.11.2019 15:53
13.11.2019 15:54
13.11.2019 15:58
13.11.2019 16:15
13.11.2019 16:19
13.11.2019 16:21
13.11.2019 16:23
13.11.2019 16:23
13.11.2019 16:25
13.11.2019 16:26
13.11.2019 16:29
13.11.2019 16:30
13.11.2019 16:31
13.11.2019 16:33
13.11.2019 16:34
13.11.2019 16:35
13.11.2019 16:37
13.11.2019 16:37
13.11.2019 16:39
14.11.2019 8:38
14.11.2019 8:43
14.11.2019 8:45
14.11.2019 8:58
14.11.2019 8:59
14.11.2019 9:12
14.11.2019 9:14
14.11.2019 9:19
14.11.2019 9:21
14.11.2019 9:22
14.11.2019 9:24
14.11.2019 9:25
14.11.2019 9:35
14.11.2019 9:42
14.11.2019 9:43
14.11.2019 9:56
14.11.2019 10:08
14.11.2019 10:08
14.11.2019 10:12
14.11.2019 10:14
14.11.2019 10:27
14.11.2019 10:30
14.11.2019 10:32
14.11.2019 10:34
14.11.2019 10:36
14.11.2019 10:40
14.11.2019 10:41
14.11.2019 11:03
14.11.2019 11:05
14.11.2019 11:07
so that the graph shows what time periods for N time how many entries appear.
performance drop chart at the end of the day

If I understood your description correctly, you are looking for something like a histogram. In gnuplot check help smooth frequency.
A starting point for optimization could be the following:
Code:
### histogram with datetime events
reset session
$Data <<EOD
timestamps_col
13.11.2019 15:42
13.11.2019 15:43
13.11.2019 15:45
13.11.2019 15:47
13.11.2019 15:48
13.11.2019 15:51
13.11.2019 15:51
13.11.2019 15:53
13.11.2019 15:54
13.11.2019 15:58
13.11.2019 16:15
13.11.2019 16:19
13.11.2019 16:21
13.11.2019 16:23
13.11.2019 16:23
13.11.2019 16:25
13.11.2019 16:26
13.11.2019 16:29
13.11.2019 16:30
13.11.2019 16:31
13.11.2019 16:33
13.11.2019 16:34
13.11.2019 16:35
13.11.2019 16:37
13.11.2019 16:37
13.11.2019 16:39
14.11.2019 8:38
14.11.2019 8:43
14.11.2019 8:45
14.11.2019 8:58
14.11.2019 8:59
14.11.2019 9:12
14.11.2019 9:14
14.11.2019 9:19
14.11.2019 9:21
14.11.2019 9:22
14.11.2019 9:24
14.11.2019 9:25
14.11.2019 9:35
14.11.2019 9:42
14.11.2019 9:43
14.11.2019 9:56
14.11.2019 10:08
14.11.2019 10:08
14.11.2019 10:12
14.11.2019 10:14
14.11.2019 10:27
14.11.2019 10:30
14.11.2019 10:32
14.11.2019 10:34
14.11.2019 10:36
14.11.2019 10:40
14.11.2019 10:41
14.11.2019 11:03
14.11.2019 11:05
14.11.2019 11:07
EOD
myTimeFmt = "%d.%m.%Y %H:%M"
set style fill solid 1.0
myInterval = 20 # time in minutes
BoxWidthScale = 0.7
# get the date/time of the first event into variable StartTime
set table $Dummy
plot $Data u (StartTime=timecolumn(1,myTimeFmt)) skip 1 every ::0::0 w table
unset table
# define function for time interval start (basically "binning")
IntervalN(n) = int((timecolumn(n,myTimeFmt)-StartTime)/(myInterval*60))*myInterval*60+StartTime
# binning the data into a new table
set format x myTimeFmt timedate
set table $HistoData
plot $Data u (IntervalN(1)) smooth freq
unset table
set format x "%d.%m.\n%Y\n%H:%M" timedate
plot $HistoData u (timecolumn(1,'"'.myTimeFmt.'"')):2:(60*myInterval*BoxWidthScale) \
w boxes title sprintf("Events in %g minute intervals",myInterval)
### end of code
Result:

Related

How do you control the order in which files appear in a GitHub Repository?

In Github, Is there any manual way(like adding some config file, or something) to sort files in order of their date modified(not based on their lexicographical order), so that the files which has been modified latest appears at the first position & so on, in Github repository?
To my knowledge, this is not possible. You can just add the date it was last updated to the front of the file to achieve this thought.
Here is an option but on your local git clone...
Will use git-restore-mtime:
https://manpages.debian.org/unstable/git-restore-mtime/git-restore-mtime.1.en.html
We clone the repo as usual:
https://github.com/idexo/idexo-sdk.git
If we list the new folder we get:
ls -la
total 52
drwxrwxr-x 4 heldersepu heldersepu 4096 Nov 8 14:57 .
drwxrwxr-x 23 heldersepu heldersepu 4096 Nov 8 14:57 ..
drwxrwxr-x 8 heldersepu heldersepu 4096 Nov 8 14:57 .git
drwxrwxr-x 3 heldersepu heldersepu 4096 Nov 8 14:57 .github
-rw-rw-r-- 1 heldersepu heldersepu 318 Nov 8 14:57 .gitignore
-rw-rw-r-- 1 heldersepu heldersepu 11978 Nov 8 14:57 index.js
-rw-rw-r-- 1 heldersepu heldersepu 723 Nov 8 14:57 package.json
-rw-rw-r-- 1 heldersepu heldersepu 930 Nov 8 14:57 package-lock.json
-rw-rw-r-- 1 heldersepu heldersepu 152 Nov 8 14:57 .prettierrc.js
-rw-rw-r-- 1 heldersepu heldersepu 5015 Nov 8 14:57 README.md
we need to do:
git restore-mtime
Then date is as expected
ls -la
total 52
drwxrwxr-x 4 heldersepu heldersepu 4096 Jun 14 2021 .
drwxrwxr-x 23 heldersepu heldersepu 4096 Nov 8 14:57 ..
drwxrwxr-x 8 heldersepu heldersepu 4096 Nov 8 15:02 .git
drwxrwxr-x 3 heldersepu heldersepu 4096 Nov 8 14:57 .github
-rw-rw-r-- 1 heldersepu heldersepu 318 Jun 14 2021 .gitignore
-rw-rw-r-- 1 heldersepu heldersepu 11978 Nov 4 17:33 index.js
-rw-rw-r-- 1 heldersepu heldersepu 723 Nov 8 11:41 package.json
-rw-rw-r-- 1 heldersepu heldersepu 930 Nov 8 11:41 package-lock.json
-rw-rw-r-- 1 heldersepu heldersepu 152 Aug 18 10:04 .prettierrc.js
-rw-rw-r-- 1 heldersepu heldersepu 5015 Nov 4 17:32 README.md
To sort by date-time we just do the -t flag:
ls -lat
total 52
drwxrwxr-x 8 heldersepu heldersepu 4096 Nov 8 15:02 .git
drwxrwxr-x 3 heldersepu heldersepu 4096 Nov 8 14:57 .github
drwxrwxr-x 23 heldersepu heldersepu 4096 Nov 8 14:57 ..
-rw-rw-r-- 1 heldersepu heldersepu 723 Nov 8 11:41 package.json
-rw-rw-r-- 1 heldersepu heldersepu 930 Nov 8 11:41 package-lock.json
-rw-rw-r-- 1 heldersepu heldersepu 11978 Nov 4 17:33 index.js
-rw-rw-r-- 1 heldersepu heldersepu 5015 Nov 4 17:32 README.md
-rw-rw-r-- 1 heldersepu heldersepu 152 Aug 18 10:04 .prettierrc.js
drwxrwxr-x 4 heldersepu heldersepu 4096 Jun 14 2021 .
-rw-rw-r-- 1 heldersepu heldersepu 318 Jun 14 2021 .gitignore

How do I sort 2 columns in shell script?

I have data like this:
Jul29 16:52
Jul30 19:06
Jul31 17:04
Aug1 17:22
Aug2 18:53
Aug3 21:44
Aug4 22:56
Aug6 17:01
Aug8 02:19
Aug8 16:49
Aug9 16:37
Aug10 21:09
Aug12 05:24
Aug12 17:09
Aug14 16:39
Aug16 16:41
Aug4 22:56
Aug6 17:01
Aug8 02:19
Aug8 16:49
Aug9 16:37
Aug10 21:09
Aug12 05:24
Aug12 17:09
Aug14 16:39
Aug16 16:41
Aug4 22:56
Aug6 17:01
Aug8 02:19
Aug8 16:49
Aug9 16:37
Aug10 21:09
Aug16 20:24
Aug16 19:09
Aug16 18:39
Aug16 16:41
I want to take out the duplicates, sort by the first column, then maintain that order and sort by the second column. Like the following:
Jul01 11:00
Aug01 12:00
Aug02 12:40
Aug03 10:00
Aug03 11:00
Aug03 13:00
I have this code:
cat filename | awk '!a[$0]++'
This only sorts the first column and something random happens to the second column. Any ideas?
When I tried cat ming | sort -k1M -k1d -k2V, I get this:
Jul29 16:52
Jul30 19:06
Jul31 17:04
Aug10 21:09
Aug10 21:09
Aug10 21:09
Aug1 17:22
Aug12 05:24
Aug12 05:24
Aug12 17:09
Aug12 17:09
Aug14 16:39
Aug14 16:39
Aug16 16:41
Aug16 16:41
Aug16 16:41
Aug16 18:39
Aug16 19:09
Aug16 20:24
Aug2 18:53
Aug3 21:44
Aug4 22:56
Aug4 22:56
Aug4 22:56
Aug6 17:01
Aug6 17:01
Aug6 17:01
Aug8 02:19
Aug8 02:19
Aug8 02:19
Aug8 16:49
Aug8 16:49
Aug8 16:49
Aug9 16:37
Aug9 16:37
Aug9 16:37
sort -u -k1.1,1.3M -k1.4n -k2V filename
-u
delete duplicate lines
-k1.1,1.3M
sort each line from word 1, character 1 to word 1, character 3 in month mode
-k1.4n
sort each line from word 1, character 4 until end of word 1 by numeric value
-k2V
sort second word in "version number" mode, which works well for the timestamp
you can use the following:
sort -k1M -k1.4n -k2V abcss | uniq
explanation:
k1M : does a month sort on the 1st column
k1.4n : does an numeric sort to get the columns in order
k2V : does a version sort on the second column to get timestamp right
The output will be:
Jul29 16:52
Jul30 19:06
Jul31 17:04
Aug1 17:22
Aug2 18:53
Aug3 21:44
Aug4 22:56
Aug6 17:01
Aug8 02:19
Aug8 16:49
Aug9 16:37
Aug10 21:09
Aug12 05:24
Aug12 17:09
Aug14 16:39
Aug16 16:41
Aug16 18:39
Aug16 19:09
Aug16 20:24

How to move files by user name to another directory in linux

I have a folder such like:
drwxrwsr-x+ 1 dz33 dcistat 212 Sep 22 13:34 ./
drwxrwsr-x+ 1 dz33 dcistat 46 Sep 7 13:51 ../
-rw-rw---- 1 qg25 dcistat 542 Sep 15 13:55 createsamplelist.R
-rwxrwxr-x 1 dz33 dcistat 3717 Sep 7 14:15 Freedman-HuEx1.0v2-Analysis.Rnw*
drwxrws---+ 1 dz33 dcistat 0 Sep 22 13:34 Gao/
-rw-rw---- 1 qg25 dcistat 530 Sep 14 17:04 .log
-rwxrwxr-x 1 dz33 dcistat 154 Sep 7 13:44 Makefile*
-rwxrwx--x 1 qg25 dcistat 1191 Sep 15 09:04 pacaroma.R*
-rw-rw---- 1 qg25 dcistat 1741 Sep 14 17:23 pacaroma.Rout
-rw-rw---- 1 qg25 dcistat 4426 Sep 15 16:54 pacmeap.R
-rw-rw---- 1 qg25 dcistat 3230 Sep 14 17:15 .RData
-rw-rw---- 1 qg25 dcistat 0 Sep 14 17:04 .txt
My question is how to move all files belong to user qg25 to the directory Gao/.
find -maxdepth 1 -user qg25 -exec mv {} Gao/ \;
find /PATH_NAME -group qg25 -exec mv -t /NEW_PATH_NAME {} +
This should do the trick but I would test it on some dummy data.

Write a Bash script which will take a single command line argument (a directory) and will print each entry in that directory

Issue : Folders are treated as Files
My Code:
#!/bin/bash
for var in $(ls)
do
echo $var
if [ -e $var ]
then
echo "This is a file"
else
echo "This is not a file"
fi
done
echo All Done
Current Contents of the Root Folder:
-rw-r--r-- 1 stibo stibo 401 Sep 17 2015 id_rsa.pub
drwxrwxr-x 24 stibo stibo 4096 Jul 26 09:25 step
-rwxr-xr-x 1 stibo stibo 51 Jul 27 12:51 test.txt
drwxrwxrwx 2 stibo stibo 4096 Aug 2 10:32 deletionFile
-rwxrw-r-- 1 stibo stibo 225 Aug 2 12:32 deletionScript.vi
-rw-rw-r-- 1 stibo stibo 235 Aug 2 12:33 logdetails.txt
-rw-rw-r-- 1 stibo stibo 123 Aug 2 12:42 path1.txt
-rw-rw-r-- 1 stibo stibo 285 Aug 2 16:18 path2.txt
drwxrwxr-x 2 stibo stibo 4096 Aug 3 10:14 archival
-rw-rw-r-- 1 stibo stibo 0 Aug 3 13:42 ls
-rw-rw-r-- 1 stibo stibo 164732 Aug 3 14:11 messages
-rw-rw-r-- 1 stibo stibo 164732 Aug 3 14:11 wtmp
drwxrwxrwx 2 stibo stibo 4096 Aug 3 14:21 backup
-rwxrwxr-x 1 stibo stibo 160 Aug 4 15:34 newScript.vi
-rw-rw-r-- 1 stibo stibo 160 Aug 4 15:41 Code.txt
-rw-rw-r-- 1 stibo stibo 0 Aug 4 15:43 Details.txt
Where there are 4 folders and 12 files.
But when I run the script, I could see every thing is considered as a file, even if there are folders in it.
Can you please let me know where I am going wrong?
You've tested if a given entry exists with -e. Use -d for testing for directories and -f for files

How to display and then delete files which are older than 1 day

I am looking for a command which can show the list of files which are older than 1 day and a command which can delete those files.
Here is the command I have:
sudo find -type f -name "*.tmp" -mtime +1 -exec ls -ltrh {} \;
This command is giving me the list of files which are older than 2 days. But I want to get the list of files which are more than 24Hrs old.
Similarly, I have below command which deletes the files:
sudo find -type f -name "*.tmp" -mtime +1 -delete
Again same issue, it deletes only those files which are 2 days old.
Can you help me with the correct command to use.
**Update : **
This is the list which I got if I do ls -ltr
-rw------- 1 user user 56344 Jun 18 03:22 4852594605084969096.tmp
-rw------- 1 user user 62420 Jun 18 03:52 8128596406378306564.tmp
-rw------- 1 user user 45108 Jun 18 05:14 9221373979761847380.tmp
-rw------- 1 user user 52092 Jun 18 05:38 8803375736497642014.tmp
-rw------- 1 user user 46076 Jun 18 05:55 2597624169466947823.tmp
-rw------- 1 user user 45108 Jun 18 06:10 7331064027553067163.tmp
-rw------- 1 user user 57600 Jun 18 06:53 571617644221476695.tmp
-rw------- 1 user user 46076 Jun 18 06:53 3250632105294480811.tmp
-rw------- 1 user user 46076 Jun 18 06:53 3049416494164364083.tmp
-rw------- 1 user user 56344 Jun 18 07:28 3800708410202563331.tmp
-rw------- 1 user user 45108 Jun 18 07:28 8459614580010423232.tmp
-rw------- 1 user user 43520 Jun 18 07:57 8661904436966583049.tmp
-rw------- 1 user user 46076 Jun 18 07:57 1204891285897472382.tmp
-rw------- 1 user user 81900 Jun 18 09:32 8465358150249612844.tmp
-rw------- 1 user user 124432 Jun 18 09:32 7187243412111611681.tmp
-rw------- 1 user user 56436 Jun 18 09:51 8372171566419231034.tmp
-rw------- 1 user user 42904 Jun 18 09:51 667863893329482278.tmp
-rw------- 1 user user 41972 Jun 18 10:11 3847591475306960147.tmp
-rw------- 1 user user 116872 Jun 18 10:11 7966362913792512054.tmp
-rw------- 1 user user 45108 Jun 18 10:11 8439035344531042431.tmp
-rw------- 1 user user 185560 Jun 18 10:11 8474346694096813378.tmp
-rw------- 1 user user 46076 Jun 18 10:11 4760470706645148372.tmp
-rw------- 1 user user 41972 Jun 18 10:11 9157761570806548970.tmp
-rw------- 1 user user 42904 Jun 18 10:12 8915926699291849585.tmp
-rw------- 1 user user 41972 Jun 18 10:22 4483378368608075076.tmp
-rw------- 1 user user 46076 Jun 18 10:22 8039354996724735242.tmp
-rw------- 1 user user 46076 Jun 18 10:22 1441427612150519563.tmp
-rw------- 1 user user 46076 Jun 18 13:39 3895289049566214606.tmp
-rw------- 1 user user 46076 Jun 18 13:41 4523819359899311681.tmp
-rw------- 1 user user 59608 Jun 18 14:28 5171792312670553667.tmp
-rw------- 1 user user 41972 Jun 18 16:07 1381867850547954997.tmp
-rw------- 1 user user 46076 Jun 18 16:08 2377385254288601418.tmp
-rw------- 1 user user 46076 Jun 18 16:08 2757855781341192620.tmp
-rw------- 1 user user 46076 Jun 18 16:08 990402164110920641.tmp
-rw------- 1 user user 88980 Jun 18 17:02 3519429446055316602.tmp
-rw------- 1 user user 46076 Jun 18 18:34 2718504484399041994.tmp
-rw------- 1 user user 52588 Jun 18 20:40 8282149999256755040.tmp
-rw------- 1 user user 45108 Jun 18 20:40 2535213203951007401.tmp
-rw------- 1 user user 62804 Jun 18 20:41 3344181299125676547.tmp
-rw------- 1 user user 46076 Jun 18 20:56 5704898344921554440.tmp
-rw------- 1 user user 57600 Jun 18 21:04 6910781806107437056.tmp
-rw------- 1 user user 57600 Jun 18 21:05 8996587449350363530.tmp
-rw------- 1 user user 57600 Jun 18 21:05 2201114289500171076.tmp
-rw------- 1 user user 171212 Jun 18 21:43 568113257671337808.tmp
-rw------- 1 user user 46076 Jun 19 02:22 4686252438135803799.tmp
-rw------- 1 user user 46076 Jun 19 02:23 1024337710253657481.tmp
-rw------- 1 user user 46076 Jun 19 02:23 8138681836575745204.tmp
-rw------- 1 user user 46076 Jun 19 02:23 4551895045706757158.tmp
-rw------- 1 user user 72880 Jun 19 02:58 6720139662475805522.tmp
-rw------- 1 user user 138036 Jun 19 03:39 4261193719990867277.tmp
-rw------- 1 user user 43520 Jun 19 04:30 2189638076744384268.tmp
-rw------- 1 user user 46076 Jun 19 04:30 9069524378589378948.tmp
-rw------- 1 user user 46076 Jun 19 06:21 4197944256637931725.tmp
-rw------- 1 user user 41972 Jun 19 07:01 4881839192080059356.tmp
-rw------- 1 user user 41972 Jun 19 07:29 7939325415825814975.tmp
-rw------- 1 user user 52092 Jun 19 08:02 334987770024624782.tmp
-rw------- 1 user user 38504 Jun 19 09:19 2006993025338095576.tmp
-rw------- 1 user user 43520 Jun 19 09:41 7349787809048549539.tmp
-rw------- 1 user user 42904 Jun 19 09:45 1393091432117053268.tmp
-rw------- 1 user user 52588 Jun 19 09:45 6110897423492319793.tmp
-rw------- 1 user user 62804 Jun 19 09:45 9143197155997936730.tmp
-rw------- 1 user user 88980 Jun 19 10:47 2758611773267584579.tmp
-rw------- 1 user user 88980 Jun 19 10:47 8190296254180009992.tmp
-rw------- 1 user user 45108 Jun 19 13:06 5668356474649690853.tmp
-rw------- 1 user user 46076 Jun 19 13:06 8831342235645870908.tmp
-rw------- 1 user user 52092 Jun 19 13:07 3760436936603717823.tmp
-rw------- 1 user user 46020 Jun 19 13:43 5381449090462674458.tmp
-rw------- 1 user user 45108 Jun 19 13:51 5714193329079454521.tmp
-rw------- 1 user user 62420 Jun 19 14:08 1861226554558152474.tmp
-rw------- 1 user user 45108 Jun 19 14:09 8180644227674226434.tmp
-rw------- 1 user user 56344 Jun 19 14:11 1162382849464709134.tmp
-rw------- 1 user user 56344 Jun 19 14:11 4473912385829326236.tmp
-rw------- 1 user user 59224 Jun 19 14:12 44816572340739296.tmp
-rw------- 1 user user 49416 Jun 19 14:29 2253955402032058887.tmp
-rw------- 1 user user 46076 Jun 19 14:54 2224021715630683512.tmp
-rw------- 1 user user 83472 Jun 19 15:25 455967079139355584.tmp
-rw------- 1 user user 83472 Jun 19 15:26 1074541420877403068.tmp
-rw------- 1 user user 46076 Jun 19 15:59 3632140460732481164.tmp
-rw------- 1 user user 45108 Jun 19 17:30 8847261278086377700.tmp
-rw------- 1 user user 54000 Jun 19 18:02 8681044407184944721.tmp
-rw------- 1 user user 54564 Jun 19 20:01 7703927324243684958.tmp
-rw------- 1 user user 54564 Jun 19 20:01 7448280277407508823.tmp
-rw------- 1 user user 54564 Jun 19 20:01 7069154843842198769.tmp
-rw------- 1 user user 54564 Jun 19 20:02 1431729105371009759.tmp
-rw------- 1 user user 54564 Jun 19 20:02 8359037531819485082.tmp
-rw------- 1 user user 54564 Jun 19 20:03 6457682749783413761.tmp
-rw------- 1 user user 54564 Jun 19 20:03 2038572826201539987.tmp
-rw------- 1 user user 54564 Jun 19 20:04 6491355393264185784.tmp
-rw------- 1 user user 59224 Jun 19 20:16 2043006978494200118.tmp
-rw------- 1 user user 45108 Jun 19 20:17 6492540855183189725.tmp
-rw------- 1 user user 45108 Jun 19 20:17 6477956601825850231.tmp
-rw------- 1 user user 45108 Jun 19 20:18 1074194357181759005.tmp
-rw------- 1 user user 45108 Jun 19 20:19 5440321220011066253.tmp
-rw------- 1 user user 45108 Jun 19 20:19 260683267390104293.tmp
-rw------- 1 user user 45108 Jun 19 20:20 1824196232656746433.tmp
-rw------- 1 user user 45108 Jun 19 20:20 8724797559370142565.tmp
-rw------- 1 user user 45108 Jun 19 20:21 6397991201954236018.tmp
-rw------- 1 user user 72880 Jun 20 04:14 7838401226118727100.tmp
-rw------- 1 user user 72880 Jun 20 04:15 7801714965385023569.tmp
-rw------- 1 user user 45108 Jun 20 08:42 1274908829136861980.tmp
-rw------- 1 user user 52092 Jun 20 08:43 5780888862258234581.tmp
-rw------- 1 user user 38628 Jun 20 08:52 756204766770614860.tmp
-rw------- 1 user user 45108 Jun 20 08:52 7485022978628098434.tmp
-rw------- 1 user user 105900 Jun 20 09:11 7854932029957477444.tmp
-rw------- 1 user user 105900 Jun 20 09:11 3956354999155285593.tmp
-rw------- 1 user user 105900 Jun 20 09:11 3966927481297956709.tmp
-rw------- 1 user user 105900 Jun 20 09:12 1705387516049599565.tmp
-rw------- 1 user user 105900 Jun 20 09:12 2525082796466540228.tmp
-rw------- 1 user user 105900 Jun 20 09:13 1591380519419898347.tmp
-rw------- 1 user user 105900 Jun 20 09:13 1102639893375607994.tmp
-rw------- 1 user user 105900 Jun 20 09:13 5262767813878310145.tmp
-rw------- 1 user user 105900 Jun 20 09:13 3288610156358797188.tmp
-rw------- 1 user user 105900 Jun 20 09:14 5829119682812572228.tmp
-rw------- 1 user user 105900 Jun 20 09:14 2452109250260818709.tmp
-rw------- 1 user user 105900 Jun 20 09:14 4590122970450657628.tmp
-rw------- 1 user user 105900 Jun 20 09:14 2294389195637964118.tmp
-rw------- 1 user user 105900 Jun 20 09:15 1676044168282755245.tmp
-rw------- 1 user user 105900 Jun 20 09:15 4366308640611104547.tmp
-rw------- 1 user user 46076 Jun 20 10:06 1107385874840309577.tmp
-rw------- 1 user user 41972 Jun 20 10:27 1085531486653661362.tmp
-rw------- 1 user user 62420 Jun 20 10:27 2101806982432516818.tmp
-rw------- 1 user user 62420 Jun 20 10:53 1624354934648606290.tmp
-rw------- 1 user user 65568 Jun 20 10:53 7654095057348026506.tmp
-rw------- 1 user user 65568 Jun 20 10:54 7700552507815118770.tmp
-rw------- 1 user user 65568 Jun 20 10:54 6308712112426443403.tmp
-rw------- 1 user user 102740 Jun 20 11:00 8795448846476018069.tmp
-rw------- 1 user user 52092 Jun 20 12:54 500845023343173208.tmp
-rw------- 1 user user 46076 Jun 20 12:54 3121276696569990545.tmp
-rw------- 1 user user 49416 Jun 20 13:46 5340608448298127831.tmp
-rw------- 1 user user 45108 Jun 20 13:46 6205360401301143413.tmp
-rw------- 1 user user 46076 Jun 20 13:59 855287858467535972.tmp
-rw------- 1 user user 56344 Jun 20 14:06 1803842700206075916.tmp
-rw------- 1 user user 46076 Jun 20 14:37 6491060217824383745.tmp
-rw------- 1 user user 45108 Jun 20 15:22 4328564943420472688.tmp
-rw------- 1 user user 45108 Jun 20 15:22 673290658104000296.tmp
-rw------- 1 user user 62804 Jun 20 15:22 3787216729224135023.tmp
-rw------- 1 user user 56344 Jun 20 21:08 4510338970233080762.tmp
-rw------- 1 user user 41972 Jun 21 00:13 398372327339912681.tmp
-rw------- 1 user user 56344 Jun 21 00:13 6904086396325952937.tmp
-rw------- 1 user user 59608 Jun 21 00:46 4051984352785933079.tmp
-rw------- 1 user user 127044 Jun 21 01:45 1935681615649757944.tmp
-rw------- 1 user user 55380 Jun 21 04:00 788398820398782761.tmp
-rw------- 1 user user 57600 Jun 21 04:00 3451867978654331939.tmp
-rw------- 1 user user 81900 Jun 21 06:09 3933771831691223539.tmp
-rw------- 1 user user 41304 Jun 21 06:10 5072654537578520166.tmp
-rw------- 1 user user 63668 Jun 21 06:10 8226596435615677441.tmp
-rw------- 1 user user 52092 Jun 21 07:48 7828279481225944808.tmp
-rw------- 1 user user 45684 Jun 21 10:30 2656910068365164057.tmp
-rw------- 1 user user 45108 Jun 21 10:31 195381961836753748.tmp
-rw------- 1 user user 43520 Jun 21 12:17 2400956652998491214.tmp
-rw------- 1 user user 49416 Jun 21 12:17 30508930089948393.tmp
-rw------- 1 user user 46020 Jun 21 12:17 6661846546424060419.tmp
-rw------- 1 user user 138036 Jun 21 12:17 5959997606181451969.tmp
-rw------- 1 user user 77388 Jun 21 13:03 331824420489889105.tmp
-rw------- 1 user user 52092 Jun 21 13:04 3758738812509306383.tmp
-rw------- 1 user user 45108 Jun 21 13:37 7496237755092762906.tmp
-rw------- 1 user user 59608 Jun 21 13:38 6544683383068478158.tmp
-rw------- 1 user user 52092 Jun 21 14:16 5731163136062904185.tmp
-rw------- 1 user user 45108 Jun 21 16:18 5547529479186863324.tmp
-rw------- 1 user user 171212 Jun 21 16:20 8323838581661442775.tmp
-rw------- 1 user user 42904 Jun 21 16:20 7250838806301761089.tmp
-rw------- 1 user user 171212 Jun 21 16:20 813682571379587717.tmp
-rw------- 1 user user 171212 Jun 21 16:20 8291233772358876144.tmp
-rw------- 1 user user 42904 Jun 21 16:20 4576361552735460033.tmp
-rw------- 1 user user 171212 Jun 21 16:20 1380471275230087315.tmp
-rw------- 1 user user 42904 Jun 21 16:21 3773859160506116712.tmp
-rw------- 1 user user 42904 Jun 21 16:21 1093442959977787407.tmp
-rw------- 1 user user 45684 Jun 21 16:21 7132957373537332056.tmp
-rw------- 1 user user 81900 Jun 21 17:41 4874781119889192787.tmp
-rw------- 1 user user 81900 Jun 21 18:59 458733250710614684.tmp
-rw------- 1 user user 45108 Jun 21 18:59 8010533676207338451.tmp
-rw------- 1 user user 49416 Jun 21 22:47 6193537558164312069.tmp
-rw------- 1 user user 45108 Jun 21 22:47 5030888357164286514.tmp
-rw------- 1 user user 38628 Jun 22 01:53 5987612845570695845.tmp
-rw------- 1 user user 45108 Jun 22 01:53 8340424949591407739.tmp
Now running the command find . -mtime 1 -type f -exec ls -lrth "{}" \; gives me below list:
-rw------- 1 user user 62K Jun 20 15:22 3787216729224135023.tmp
-rw------- 1 user user 45K Jun 20 13:46 6205360401301143413.tmp
-rw------- 1 user user 104K Jun 20 09:14 2452109250260818709.tmp
-rw------- 1 user user 45K Jun 20 15:22 673290658104000296.tmp
-rw------- 1 user user 45K Jun 20 13:59 855287858467535972.tmp
-rw------- 1 user user 56K Jun 21 00:13 6904086396325952937.tmp
-rw------- 1 user user 104K Jun 20 09:14 2294389195637964118.tmp
-rw------- 1 user user 45K Jun 20 14:37 6491060217824383745.tmp
-rw------- 1 user user 125K Jun 21 01:45 1935681615649757944.tmp
-rw------- 1 user user 45K Jun 20 08:52 7485022978628098434.tmp
-rw------- 1 user user 104K Jun 20 09:14 5829119682812572228.tmp
-rw------- 1 user user 104K Jun 20 09:15 4366308640611104547.tmp
-rw------- 1 user user 104K Jun 20 09:12 1705387516049599565.tmp
-rw------- 1 user user 104K Jun 20 09:13 3288610156358797188.tmp
-rw------- 1 user user 104K Jun 20 09:11 7854932029957477444.tmp
-rw------- 1 user user 65K Jun 20 10:54 7700552507815118770.tmp
-rw------- 1 user user 45K Jun 20 15:22 4328564943420472688.tmp
-rw------- 1 user user 41K Jun 20 10:27 1085531486653661362.tmp
-rw------- 1 user user 51K Jun 20 08:43 5780888862258234581.tmp
-rw------- 1 user user 56K Jun 20 14:06 1803842700206075916.tmp
-rw------- 1 user user 72K Jun 20 04:15 7801714965385023569.tmp
-rw------- 1 user user 41K Jun 21 00:13 398372327339912681.tmp
-rw------- 1 user user 38K Jun 20 08:52 756204766770614860.tmp
-rw------- 1 user user 104K Jun 20 09:13 1591380519419898347.tmp
-rw------- 1 user user 49K Jun 20 13:46 5340608448298127831.tmp
-rw------- 1 user user 45K Jun 20 12:54 3121276696569990545.tmp
-rw------- 1 user user 104K Jun 20 09:15 1676044168282755245.tmp
-rw------- 1 user user 101K Jun 20 11:00 8795448846476018069.tmp
-rw------- 1 user user 104K Jun 20 09:11 3956354999155285593.tmp
-rw------- 1 user user 45K Jun 20 10:06 1107385874840309577.tmp
-rw------- 1 user user 61K Jun 20 10:27 2101806982432516818.tmp
-rw------- 1 user user 104K Jun 20 09:11 3966927481297956709.tmp
-rw------- 1 user user 72K Jun 20 04:14 7838401226118727100.tmp
-rw------- 1 user user 56K Jun 20 21:08 4510338970233080762.tmp
-rw------- 1 user user 51K Jun 20 12:54 500845023343173208.tmp
-rw------- 1 user user 104K Jun 20 09:12 2525082796466540228.tmp
-rw------- 1 user user 61K Jun 20 10:53 1624354934648606290.tmp
-rw------- 1 user user 65K Jun 20 10:54 6308712112426443403.tmp
-rw------- 1 user user 45K Jun 20 08:42 1274908829136861980.tmp
-rw------- 1 user user 59K Jun 21 00:46 4051984352785933079.tmp
-rw------- 1 user user 104K Jun 20 09:14 4590122970450657628.tmp
-rw------- 1 user user 104K Jun 20 09:13 5262767813878310145.tmp
-rw------- 1 user user 65K Jun 20 10:53 7654095057348026506.tmp
-rw------- 1 user user 104K Jun 20 09:13 1102639893375607994.tmp
I was expecting all the files which are dated Jun 18, Jun 19, Jun 20, Jun 21. The Jun 21 files can be restricted to files which or older than 24Hrs. But the command is giving only Jun 20 & Jun 21 files which are older than 24Hrs but ignoring Jun 18 & Jun 19 files.
find allows just that using -mtime option as explained in the answer here which does the trick for you.
The answer you are looking forward to is below, which finds files that were modified exactly between 1 and 2 days ago.
-mtime 1 (the actual answer)
find /sourcedirectory -mtime 1 -type f -exec ls -lrth "{}" \; -exec rm "{}" \;
in general finds files that were last modified between N and N+1 days ago.
will be just sufficient for listing and deleting the files. You can use any number of -exec's as long as you follow the syntax.
Other options work as follows:-
-mtime +N -> files modified at least N+1 days ago
-mtime -N -> files modified less than N days ago

Resources