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.
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 ?
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.
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.
I'd be careful with the * but without extensions oh my...
It is not about rm alone. I need to list every file name in one single line separated by whitespace.
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.
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 ?
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.
The shell always thinks that a new line (\n) is a new command. Put all filenames in a single line.
The arguments all have to be on the same line, or else the shell thinks you want to start a new comnand
ls >> filenames
i think it happens because the keys [ ] are command keys so try putting \ before these keys
rm "VideosForPets[PaulDining][21July22].txt"