strings
命令在 Linux 中用于顯示文件中的可打印字符串
如果你想查看符號鏈接指向的文件中的可打印字符串,你可以使用 -f
或 --files-with-names
選項。這個選項會讓 strings
命令處理符號鏈接指向的文件,而不是符號鏈接本身。
例如,假設你有一個名為 link_to_file.txt
的符號鏈接,它指向名為 target_file.txt
的文件。要查看 target_file.txt
中的可打印字符串,你可以運行以下命令:
strings -f link_to_file.txt
這將顯示 target_file.txt
中的可打印字符串,而不是 link_to_file.txt
的內容。