I want to remove all lines with current datetime-30 days, in my .txt file.
"2023-01-01 10:41:32";"AAAAAAA";"BBBBBB";"CCCCCC";"DDDDDDD";"XXXXXX";"FFFFFFF";"EEEEEEE"
"2023-02-01 12:40:02";"AAAAAAA";"BBBBBB";"CCCCCC";"DDDDDDD";"XXXXXX";"FFFFFFF";"EEEEEEE"
"2022-01-03 09:11:02";"AAAAAAA";"BBBBBB";"CCCCCC";"DDDDDDD";"XXXXXX";"FFFFFFF";"EEEEEEE"
"2022-11-01 02:11:05";"AAAAAAA";"BBBBBB";"CCCCCC";"DDDDDDD";"XXXXXX";"FFFFFFF";"EEEEEEE"
"2023-02-01 05:55:32";"AAAAAAA";"BBBBBB";"CCCCCC";"DDDDDDD";"XXXXXX";"FFFFFFF";"EEEEEEE"
"2023-02-05 12:41:21";"AAAAAAA";"BBBBBB";"CCCCCC";"DDDDDDD";"XXXXXX";"FFFFFFF";"EEEEEEE"
"2022-12-18 18:00:00";"AAAAAAA";"BBBBBB";"CCCCCC";"DDDDDDD";"XXXXXX";"FFFFFFF";"EEEEEEE"
"2022-01-29 11:22:00";"AAAAAAA";"BBBBBB";"CCCCCC";"DDDDDDD";"XXXXXX";"FFFFFFF";"EEEEEEE"
"2022-01-31 12:00:00";"AAAAAAA";"BBBBBB";"CCCCCC";"DDDDDDD";"XXXXXX";"FFFFFFF";"EEEEEEE"
when I save it I should only have those lines left:
"2023-02-01 12:40:02";"AAAAAAA";"BBBBBB";"CCCCCC";"DDDDDDD";"XXXXXX";"FFFFFFF";"EEEEEEE"
"2023-02-01 05:55:32";"AAAAAAA";"BBBBBB";"CCCCCC";"DDDDDDD";"XXXXXX";"FFFFFFF";"EEEEEEE"
"2023-02-05 12:41:21";"AAAAAAA";"BBBBBB";"CCCCCC";"DDDDDDD";"XXXXXX";"FFFFFFF";"EEEEEEE"
First I tried to copy to a CSV file, and it works fine. But I'm stuck when I want to filter the dates. Any help?
Related
I got one problem i got like 20000 folders in every folder is like 10 files .txt
I need to extract from every folder specific text file which has a name Names.txt
How can I do it, to get 20000 files Names.txt in one folder?
i have a problem, i used "everything" to extract every txt file from a specific directory so that i can merge them. But on emeditor i don't find a way to merge file from a list of localisation.
Here what the everything file look like:
E:\Main directory\subdirectory 1\file.txt
E:\Main directory\subdirectory 2\file.txt
E:\Main directory\subdirectory 3\file.txt
E:\Main directory\subdirectory 4\file.txt
The list goes over 40k location. is there a way to use a program to read all the location in the text file and combine them ?
Also, the subdirectory has other txt file that i don't want to so i can't just merge all txt file from the main. Another thing is that there are variation of the "file.txt" like "Files.txt" for example.
I have a csv file score.csv with at path /NAS/DQ with 2 columns Scorename,filename.
scorename,filename
ABC,cust.txt
XYZ,bank.txt
These filescust.txt and bank.txt are placed at /NAS/files_path. There will be unique instance of each file placed at this path everyday.
I want to append the file timestamp from /NAS/files_path to /NAS/DQ csv file.
So the timestamp should be updated everytime to the csv file at /NAS/DQ location.
I am new to unix and currently looking for ways to do it.
Any help is appreciated!!
Sed will be a good candidate for this:
sed -ri '2,$s/(^.*$)/\1 '$(date)'/' filename
Substitute the existing line for the existing line plus a space and the date. The format of the date can be amended as required with +%.. We don't want to format the first line, so run the amendments from lines 2 to the last line ($)
I tried to filescan,and I see the .txt I want to open.But how can I open the txt?
I am new with volatility,and I tried more than 6 hours to get the txt.I tried dumpfiles,but I finally get lots of files that does'nt match the file I want to get.
get the imagebaseadress of the file and run db(imagebaseadress) inside volshell you should see the contents
I need to create a shell script that reads a different folder based on today's date and inside the folder contains multiple files and one csv file that will have unique name everyday that is tab delimited. I want to pull this file and resave it as a text file.
Example of file path:
data/model/output20190725 (folder contains multiple files, new folder is created everyday)
-logfile1
-logfile2
-part3983isis4838.csv (this csv file will have a new and randomly generated name everyday, the csv file is also tab delimited)
I know how to go from a csv file to a text file, but I don't know how to add the logic of the folder name and the csv name changing everyday.
I saw that I could possibly use grep, but I don't know how to navigate to today's date folder and pull the csv and pass to the next argument to make the conversion.
grep -l .csv * |