I want to be able to run a command, it fails cause it doesn't have proper permissions. Then I can write "please" to sudo the command I just ran.
Here's what I want to do in the terminal:
$ run command
"you don't have access to do that"
$ please
"ran successfully"
I saw that !!
On the bash command-line, ↑ gives me the previous command. On the command-lines in numpy or matlab, when I type a few characters, ↑ gives me the previously entered command starting with those characters. How can I enable exactly this behaviour in bash?
I am aware of more advanced ways of searching through the command-line history, but sometimes a simple way is more convenient.
I would like the shell to warn me for potential errors I'm about to make.
How can I prevent a command cmd2 from being executed after cmd1.
For example:
$ tar tf file.tar
$ rm !$
Here, I just forgot that I listed the file instead of extracting its content.
I'm looking for a generic solution, that makes a choice based on the name and return value of the previous command, and on the current co
Sometimes you may want to run multiple commands in the terminal. Here is how to do it:
If you want to run multiple commands in the terminal respectively, just add a semicolon (;) between two commands. For example:
command1; command2; command3
With this syntax, it does not matter if a command returns to error, all the commands you use will be executed eventually.
I have a script with sudo command. If I double click it I see a choice "run in terminal, view, cancel, run"
if I select just "run" sudo command does not execute, if I select "run in terminal" it works fine.
I'd like to create launcher for this script but via it execition goes in "run" mode, so no sudo command
How to solve this?
Hi i know how to get no of files in some particular folder by following command which includes today and previous days files also
Code:
ls |wc -l
but i needed a command in which i can list previous one or two days files only.
I am looking for a way to send an executed command to a TTY terminal. For example, let us say that I open the gnome-terminal and on the window I type sudo aptitude update && sudo aptitude upgrade. How can I send this to a TTY terminal instead of working with it in the TTY7 GUI environment?
I've installed F17. My network connection and sound card stop working
sometimes requiring me to reboot before they work again.
These are software issues with the release. I've seen where many people are
having the same problems and there is no solution. F17 is just a bad release for many people.
Yesterday we introduced your to Linux command line console or shell in our previous post. To read that post, click here.
Today we will continue from where we left off and expand a little into more advanced commands.