Last Update 2014/03/11
ファイルの末尾部分を表示します。
※ オプションなどは個人的に重要と考えられるものを記述しており、記載の無いものは、manページや関連書籍などを参照願います。
※ 実行例の記述は、不要と考えられる部分の削除などの修正を行ったものを掲載しています。
※ 実行例の実行環境はFreeBSD 9.1です。
※ 実行例の記述は、不要と考えられる部分の削除などの修正を行ったものを掲載しています。
※ 実行例の実行環境はFreeBSD 9.1です。
(例) オプション無し
実行結果
$ tail /usr/include/stdio.h
#define getc_unlocked(fp) __sgetc(fp)
#define putc_unlocked(x, fp) __sputc(x, fp)
#define getchar_unlocked() getc_unlocked(stdin)
#define putchar_unlocked(x) putc_unlocked(x, stdout)
#endif
#endif /* __cplusplus */
__END_DECLS
#endif /* !_STDIO_H_ */
実行結果
$ tail -c 100 /usr/include/stdio.h ← 末尾から100バイト出力
ed(x) putc_unlocked(x, stdout)
#endif
#endif /* __cplusplus */
__END_DECLS
#endif /* !_STDIO_H_ */
$ tail -c +16300 /usr/include/stdio.h ← 先頭から16300バイトの位置から出力
sferror(p)
#define clearerr_unlocked(p) __sclearerr(p)
#define fileno_unlocked(p) __sfileno(p)
#endif
#if __POSIX_VISIBLE >= 199506
#define getc_unlocked(fp) __sgetc(fp)
#define putc_unlocked(x, fp) __sputc(x, fp)
#define getchar_unlocked() getc_unlocked(stdin)
#define putchar_unlocked(x) putc_unlocked(x, stdout)
#endif
#endif /* __cplusplus */
__END_DECLS
#endif /* !_STDIO_H_ */
実行結果
$ tail -n 5 /usr/include/stdio.h ← 末尾から5行出力
#endif
#endif /* __cplusplus */
__END_DECLS
#endif /* !_STDIO_H_ */
$ tail -n +515 /usr/include/stdio.h ← 先頭から515行目から出力
#define getchar_unlocked() getc_unlocked(stdin)
#define putchar_unlocked(x) putc_unlocked(x, stdout)
#endif
#endif /* __cplusplus */
__END_DECLS
#endif /* !_STDIO_H_ */