Search Results

Search: Posts Made By: Home
692
Posted By Home
As I mentioned before they are text file which...
As I mentioned before they are text file which ends with .txt as type of file.
The last file name is missing 'e'. All daily files have different name but everyday the same files would be...
692
Posted By Home
Yes, the type of file is txt and as I mentioned...
Yes, the type of file is txt and as I mentioned the name of files are different.



Files are there in 'Output' directory, here is result:
abcd_part_2018-02-21_100004.txt...
692
Posted By Home
Does abcd_part_2018-02-23_100004 exist in your...
Does abcd_part_2018-02-23_100004 exist in your local directory, or is it abcd_part_2018-02-23_100004.txt? YES, they are there, all files.

Does LOCALPATH='/opt/abc/Output' exist? YES

What's its...
692
Posted By Home
Hi, Here is the code: #!/bin/ksh # # ...
Hi,
Here is the code:

#!/bin/ksh
#
#

DATE=`date "+%Y%m%d"`

HOST='abcd.com'
USER='abc'
PASSWD='****'
LOCALPATH='/opt/abc/Output'
LOGPATH='/opt/abc/logs'

ftp -n -v $HOST...
692
Posted By Home
Time in filename
Hi,

I've some files that I want to send them daily via ftp. Date and time are a part of filename, for example:

abcd_deft_2018-02-21_100012
abcd_mnpo_2018-02-21_100020
These files are created...
1,462
Posted By Home
Thank you all for your replies. I copied the code...
Thank you all for your replies. I copied the code in notepad++ and here is the lines for code:

line1 #!/bin/sh
line2
line3 FOLDER=/abc/datasource/checkstatus
line4
line5 TIMESTAMP=$(date...
1,462
Posted By Home
I changed some part of the code but the for loop...
I changed some part of the code but the for loop shows all files and not those that are older than 30 days and also the result for $(TIMESTAMP-$f2) is the same for all file name that is listed, here...
1,462
Posted By Home
Yes, I've tested with -mtime and it works fine....
Yes, I've tested with -mtime and it works fine. but sometime we are moving files to other folder and then the -mtime doesn't work to list them, then the best way is to extract the date from filename.
1,462
Posted By Home
Listing files older than 30 days
Hi,

Could someone help me that what the problem is in this code?

#!/bin/sh

FOLDER=/abc/datasource/checkstatus

TIMESTAMP=$(date +%s)

for filename in $(find $FOLDER -maxdepth 1...
522
Posted By Home
Extract data before period in filename
Hi,
I have some files with these patterns:

WI_SCOPE_DATA_CHANGE_2017-09-12_15-30-40.txt
WI_SCOPE_BACK_COMPLETE_QUEUE_2017-09-12_15-31-40.txt
WI_SCOPE_CURRENT_CHECK_QUEUE_2017-09-12_15-32-40.txt...
3,373
Posted By Home
Thank you for your reply. There are more...
Thank you for your reply.

There are more than 6 files with these filenames which begins with 'WI_SCOPE_'. Could you give me an example that how I can write a loop that read these files and...
3,373
Posted By Home
How to extract date and time from filename?
Hi,

I'm totally new in sell script and working with a shell code. I want to extract the date and time from the filenames. The filenames are different but all of them begins with WI_ SCOPE_:
...
1,901
Posted By Home
Actually, I'm working with a shell code so that...
Actually, I'm working with a shell code so that it removes files older than 32 days in current directory(and not in subdirectories).

Here is my code, first I try to test my program by finding the...
1,901
Posted By Home
Thank you all ;-) The issue is resolved. Now I...
Thank you all ;-) The issue is resolved. Now I can see the list of files when I run the command.

But I have another question. In this directory i have some other subdirectories that contains files...
1,901
Posted By Home
Linux find command returns nothing
Under one of my directories on server I have more than 500 files with different type and name. When I run the find command to list the files with 'ABC_DEFGH' in the begining of its name and older...
Showing results 1 to 15 of 15

 

Featured Tech Videos

All times are GMT -4. The time now is 05:42 PM.
Unix & Linux Forums Content Copyright 1993-2020. All Rights Reserved.
Privacy Policy