I can't paste the long command into the terminal.
There is a ls command which takes alot of argumnets and i'm trying to insert in into the terminal by copying.
But it runs every single line.
So i get error.
What can i do ?
It sounds like it's multiple commands, or one that has —for some reason or other— been split over multiple lines. If you could show us, that would go some distance to let is know which it is in this case.
That's not to say that there aren't cases where a command really is too long, it's just really rare in practice, certainly when copying and pasting! If you are hitting this wall, look at
If it's one command with added newlines, remove the newlines.
Formatting on the internet isn't always perfect. Some websites (and authors) use poor tags for code and that can mean that some things get split onto multiple lines, breaking them. A simple example is running ls on two directories getting truncated:
The simple answer here is just removing that newline:
But you can also escape the newline with a backslash as the last character on the line:
If it's multiple commands that you want to run all together, not as you paste, bung them in a script and run that when you're ready.
If "the command" actually looks like:
That's two commands. When you paste them in each newline character is going to force that line to run. That's how most shells work in Ubuntu. If you want to bunch them together you can paste them into a file (let's call it
You don't have to mess around with crunchbangs and execute permissions, you just tell bash which file to open and run. You can do those things if you want to but they aren't necessary here.
The length limit is rather long, you can check it with:
So there are probably new lines between the comments. You can check it by first pasting it into gedit and make sure it has only one line, then you can paste it in the terminal use Ctrl+Shift+V