Starting a process with a key stroke in linux [closed] - linux

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 5 years ago.
Improve this question
I want to ask something that just came to my mind. I search google and stackoverflow and couldn't find a answer to my question, if there is any, please inform me.
Is it possible to bind a process to a combination of key strokes? For example, can i start my program with simply pushing the buttons ctrl + k or it can be any other function keys. Is it possible to start a process like that? I know that i must compile kernel and boot up again if it is possible but i couldn't find the place where the meaning of key combinations stored.
Thanks for helping.

you can use bind for this, i.e. to run pwd when F12 is pressed
bind '"\e[24~":"pwd\n"'
move program you want to run to /usr/bin or another directory in the stadard path use the path in the bind command
bind '"\e[24~":"absolute_path_to_program/program"'
https://unix.stackexchange.com/questions/89622/how-to-execute-a-script-in-shell-when-a-shortcut-key-is-pressed

Related

Linux terminal has odd gap between words and cursor [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 1 year ago.
Improve this question
I'm trying to work in my terminal (I'm using the standard what I believe is a debian terminal on a chromebook) and for a while now I have had a really annoying gap between the words im typing and the actual typing cursor, the space also seems to gradually increase as I type more. I've decided to just deal with it for a while now after multiple google searches led me only to dead ends and I can no longer recall what actually caused this problem in the first place, but it's starting to frustrate me.
If anyone else gets this issue a simple change in font gets rid of the extra space.

Where does finger info come from in RedHat? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 3 years ago.
Improve this question
One of the data elements produced by the finger command gives information on how long a logged in session has been idle. Where does finger get that information from on RedHat? I've looked in /proc/<pid>/ but did not find anything useful, and the documentation doesn't go into the commands implementation.
So, where in the system is finger (or w) pulling this information from?
The finger program get's this information from utmp file located at /var/run/utmp.

Is there an easy way to deal with files with long filenames and long directory names in linux? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 6 years ago.
Improve this question
Suppose I have a directory on my disk that has the name: photos_with_my_friend_John_from_first_semester_of_my_graduation_year
Now each time I want to enter this directory I must write the following command:
cd photos_with_my_friend_John_from_first_semester_of_my_graduation_year
I am new to linux and for me it is very boring to write this whole name each time I want to deal with this directory or any other directory or file that has such a long name. So is there an alternative easy way to do this?
Most shells offer tab completion: You simply type cd phot and hit Tab, and it'll insert the rest for you (assuming the prefix is unique).
How about using wildcards? Say photos*John*graduation etc.?
You can create a symbolic link for ease of access:
ln -s long_file_name short_file_name
then you can use short_file_name as you wish.

Trying to find out why I lost my file system on Ubuntu 11.04 [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 8 years ago.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
This question does not appear to be about programming within the scope defined in the help center.
Improve this question
I recently made the following (i believe important) changes to my system
Actually I was following this tutorial to use something called Linux Containers.
So can you tell me if any of the following stuff is capable enough to crash my system ?
1. Making changes to /etc/fstab or
2. mount /cgroup which will try to mount cgroups automatically or
3 making changes to etc/network/interfaces or
4 making changes to /etc/resolv.conf
A typo in fstab can definitely make a system un-bootable. However, you should be able to boot from CD, mount the HD, and fix it.

Automatic disk check [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 6 years ago.
Improve this question
Ubuntu sometimes want to work automatic disk check and waiting press a key from me. But my computer is far away and hasn't a keyboard. I want to check automatic disk check without pressing a key. I'm using ubuntu 10.04. I know ubuntu does a disk check on every ~20 boots. It is not a problem for me. My problem is waiting press a key from me for disk check. And so system is not booting until press a key.
You can set FSCKFIX=yes

Resources