how to cat a file with giant name

Other Mainframe related questions which attracts you and there is no suitable Forum you find for it and related FAQs.
User avatar
demecarv
Registered Member
Posts: 52
Joined: Sat Sep 12, 2015 2:03 am

how to cat a file with giant name

Post by demecarv »

I am getting "No such file or directory" while trying to cat a file which its name go beyond an unique line. Kindly, see below all steps:

Code: Select all

$ cd /WebSphere/was85/dtl85cel/wlemyAppa/AppServer/profiles/default/logs/ffdc
$ find . -name "*15.11.02_14.56.01.0475522723111132066961.txt"
./dtl85cel_wlemyAppa_WLEMYAPP_WLEMYAPP_STC05810_000007E0000007D7_9cb72cb6_15.11.02_
14.56.01.0475522723111132066961.txt
$ cat dtl85cel_wlemyAppa_WLEMYAPP_WLEMYAPP_STC05810_000007E0000007D7_9cb72cb6_11.02
_14.56.01.0475522723111132066961.txt
cat: dtl85cel_wlemyAppa_WLEMYAPP_WLEMYAPP_STC05810_000007E0000007D7_9cb72cb6_11.02_
14.56.01.0475522723111132066961.txt: EDC5129I No such file or directory.
Last edited by Anuj Dhawan on Fri Nov 06, 2015 9:01 pm, edited 1 time in total.
Reason: Added code tags,.
William Collins
Global Moderator
Global Moderator
Posts: 487
Joined: Sun Aug 25, 2013 7:24 pm

Re: how to cat a file with giant name

Post by William Collins »

cat *15.11.02_14.56.01.0475522723111132066961.txt is a workaround.
User avatar
demecarv
Registered Member
Posts: 52
Joined: Sat Sep 12, 2015 2:03 am

Re: how to cat a file with giant name

Post by demecarv »

Thanks. I tried exactly this but with "". Now that I tried without "" it worked.
William Collins
Global Moderator
Global Moderator
Posts: 487
Joined: Sun Aug 25, 2013 7:24 pm

Re: how to cat a file with giant name

Post by William Collins »

The quotes will treat whatever they bound as literal values. In your case, the asterisk (*) would be treated as an asterisk, instead of a wildcard. Without the quotes the asterisk is a wildcard, so the cat gets given a list of all the files which end with the remainder of the text. Which is only one, so you get your file.
User avatar
demecarv
Registered Member
Posts: 52
Joined: Sat Sep 12, 2015 2:03 am

Re: how to cat a file with giant name

Post by demecarv »

Thank you so much!
Post Reply Previous topicNext topic

Create an account or sign in to join the discussion

You need to be a member in order to post a reply

Create an account

Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute

Register

Sign in

Return to “Other Mainframe Topics, Off-Topics, FAQs.”