Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/linux/27.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Linux Solaris等效程序,用于跟踪文件中的字符数_Linux_Count_Solaris_Tail - Fatal编程技术网

Linux Solaris等效程序,用于跟踪文件中的字符数

Linux Solaris等效程序,用于跟踪文件中的字符数,linux,count,solaris,tail,Linux,Count,Solaris,Tail,我正在为下面的命令寻找等效命令,它可以在AIX和Linux机器上工作,但不能在Sun Solaris机器上工作。基本上是跟踪文件,只获取文件的最后10个字符: tail-c-10 filename.txt 有什么想法吗???根据,xpg4变型将按照要求执行: /usr/xpg4/bin/tail -c number The number option-argument must be a decimal integer whose si

我正在为下面的命令寻找等效命令,它可以在AIX和Linux机器上工作,但不能在Sun Solaris机器上工作。基本上是跟踪文件,只获取文件的最后10个字符:

tail-c-10 filename.txt

有什么想法吗???

根据,xpg4变型将按照要求执行:

/usr/xpg4/bin/tail -c number The number option-argument must be a decimal integer whose sign affects the location in the file, measured in bytes, to begin the copying: + Copying starts relative to the beginning of the file. - Copying starts relative to the end of the file. none Copying starts relative to the end of the file. The origin for counting is 1; that is, -c +1 represents the first byte of the file, -c -1 the last. /usr/xpg4/bin/tail -c number number选项参数必须是十进制整数 其符号会影响文件中的位置,单位为 字节,开始复制: +复制开始于相对于文件开头的位置 文件 -复制相对于文件结尾开始。 无复制相对于文件结尾开始。 计数的原点为1;也就是说,-c+1表示 文件的第一个字节,-c-1是最后一个字节。 根据报告,xpg4变体将执行要求的操作:

/usr/xpg4/bin/tail -c number The number option-argument must be a decimal integer whose sign affects the location in the file, measured in bytes, to begin the copying: + Copying starts relative to the beginning of the file. - Copying starts relative to the end of the file. none Copying starts relative to the end of the file. The origin for counting is 1; that is, -c +1 represents the first byte of the file, -c -1 the last. /usr/xpg4/bin/tail -c number number选项参数必须是十进制整数 其符号会影响文件中的位置,单位为 字节,开始复制: +复制开始于相对于文件开头的位置 文件 -复制相对于文件结尾开始。 无复制相对于文件结尾开始。 计数的原点为1;也就是说,-c+1表示 文件的第一个字节,-c-1是最后一个字节。
Solaris 11.2 tail从文件中获取最后100行: tail-100 filename.txt

Solaris 11.2使用尾部获取最后一个字符: /usr/xpg4/bin/tail-c-2 saida.txt

获取带有尾部的最后2个字符:
/usr/xpg4/bin/tail-c-3 saida.txt

Solaris 11.2 tail从文件中获取最后100行: tail-100 filename.txt

Solaris 11.2使用尾部获取最后一个字符: /usr/xpg4/bin/tail-c-2 saida.txt

获取带有尾部的最后2个字符:
/usr/xpg4/bin/tail-c-3 saida.txt

可能重复的不一样他们在数行,因为我需要数字符可能重复的不一样他们在数行,因为我需要数字符谢谢!当我使用完整路径而不是仅使用tailway时,它起作用了谢谢!当我使用完整路径而不是仅仅使用tailOP查找字符,而不是行时,它起作用了。OP查找字符,而不是行。