Issue in copying file names from terminal output

  1. What is displayed is what will be copied to clipboard. Utility "ls" outputs file names in a column, which means each file name is a new line.

  2. Just an FYI, ls -x DOES display filenames in a horizontal line... but only up to the terminal width where it inserts a new line. "pinching" the width makes it wider and using a landscape mode gives you a very wide terminal width.

  3. yeah tried ls -x already. just works on first line only. tried redirecting it to txt but same output as terminal !? the options you have stated requires much more time and basics of bash to use them. for mere one task i have already invested a lot of efforts but to no avail. since I am not a advanced user so never thought about learning bash. I am being selfish but could you plz tell me the syntax for it ?

  4. I need to copy many file_names. So I use ls to output file names on terminal and I copy file names then paste it to use with any command(here rm). It works with only first file_name and rest file_names are considered as command thus giving me the no command found error. If I direct ls output to a txt file and copy from there , same thing happens again.

Leave a Reply

Your email address will not be published. Required fields are marked *

Author: admin