Results 1 to 7 of 7
Hi
any one hlep me
I'm running into an issue during the install of /home/root1/Desktop/j2sdk-1_4_2_04-linux-i586-rpm.bin
Do you agree to the above license terms? [yes or no]
yes
Unpacking...
tail: cannot ...
- 03-31-2010 #1Just Joined!
- Join Date
- Feb 2010
- Posts
- 17
tail: cannot open `+466'
Hi
any one hlep me
I'm running into an issue during the install of /home/root1/Desktop/j2sdk-1_4_2_04-linux-i586-rpm.bin
Do you agree to the above license terms? [yes or no]
yes
Unpacking...
tail: cannot open `+466' for reading: No such file or directory
Checksumming...
please reply me.....
Thanks and Regards
Mathan
- 03-31-2010 #2Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 8,977
That's an old Java sdk, so it's possible that something in the script doesn't agree with your Ubuntu system's tail command, as indicated by the error message. Since the file is just a shell script, you can edit it and fix the problem yourself.
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!
- 03-31-2010 #3
Older versions of tail didn't require the "-n" switch. Find the "+466" in the file and make it "-n+466". That SDK is ancient, as Rubberman notes. From around 2004.
- 04-01-2010 #4Linux User
- Join Date
- Jan 2005
- Location
- Saint Paul, MN
- Posts
- 262
Actually older tail command excepted "+linecountasnumber" and so do the modern tail command. The correct solution is:
Most commands will except the "--" argument that says there are no more arguments after it or "This is the last argument". It allows for arguments to start with a "-" and not be picked up as an option when after the "--" option. Since some commands use both "-" and "+" as an option indicator (such as tail and head) the "--" gets the used often in these cases. (also removing, renaming, coping a file that starts with a minus (and maybe a plus as well) will need to know about the "--" option.Code:tail -- +466
Last edited by alf55; 04-01-2010 at 05:20 AM. Reason: More on "--"
- 04-01-2010 #5
I thought you'd taught an old dog a new trick. But in Fedora 12:
What environment did you find that to work in? Am I missing something about the syntax you advocate?Code:$ rpm -qf /usr/bin/tail coreutils-7.6-9.fc12.i686 $ wc -l /etc/services 10676 /etc/services $ tail -n+10675 /etc/services iqobject 48619/tcp # iqobject iqobject 48619/udp # iqobject $ cat /etc/services|tail -n+10675 iqobject 48619/tcp # iqobject iqobject 48619/udp # iqobject $ tail -- +10675 /etc/services tail: cannot open `+10675' for reading: No such file or directory ==> /etc/services <== nimgtw 48003/tcp # Nimbus Gateway nimgtw 48003/udp # Nimbus Gateway isnetserv 48128/tcp # Image Systems Network Services isnetserv 48128/udp # Image Systems Network Services blp5 48129/tcp # Bloomberg locator blp5 48129/udp # Bloomberg locator com-bardac-dw 48556/tcp # com-bardac-dw com-bardac-dw 48556/udp # com-bardac-dw iqobject 48619/tcp # iqobject iqobject 48619/udp # iqobject $ cat /etc/services|tail -- +10675 tail: cannot open `+10675' for reading: No such file or directory
- 05-31-2010 #6Linux User
- Join Date
- Jan 2005
- Location
- Saint Paul, MN
- Posts
- 262
The original message here looked like you were attempting to read a file named "+466" not that you were specifing 446 lines to be shown. The older versiond of tail did not need the "-n" prior to the the number. In the above case (quoted here):
would normally be done as:tail -n+10675 /etc/services
If you read the description of the the "--" it said that it ends the options so that the file "+446" could be read by tail not that the +446 was an option.Code:tail -n 10675 /etc/services
- 05-31-2010 #7
"tail -n 10675 /etc/services"
That would return the last 10675 lines. My example was for lines from line 10675 to end. The OP was working with a script intended to return line 466 through end, but it had been written for a tail command pre-dating the "-n" syntax. My 3-31-2010 post was a correct solution for that.


Reply With Quote
