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 4 years ago.
Improve this question
how does the pipeline work in the below?
last | reboot
The above rebooted the linux machine.
last search the last logged in user and last output is given to reboot and reboot will reboot the system.
last | reboot
| | => process1 output will be input
process1 process2 for process2
See the man 1 last it says
Last searches back through the file /var/log/wtmp (or the file
desigā
nated by the -f flag) and displays a list of all users logged in (and
out) since that file was created.
As Daniel says importantly, reboot doesn't care about its input. It probably doesn't read it at all, so piping something in doesn't change its behavior.
Related
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 clicked on a.out of a code in Linux, now I want to stop running code but as I didn't use the terminal, I don't know that how can I stop the code from running. What can I do?
I am running another code from last week.
I can not kill both by turn off the computer because the first code is running from previous week and I don't have time to run it again
So, if you're running two instances of a.out (which I'm just assuming because your question is unclear...) then, as other users have said, run:
pgrep a.out
If the second a.out process is the one you want to kill, take the larger PID number (in your case it seems to be 19564) and run:
kill 19564
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
When I start system I see black display with message:
/dev/sda1: clean....blocks
How to skip this step and run Ubuntu? It takes over 3 hours to check HDD 500 gb
NOTE: Your question is off-topic for this site. It should be on Ask Ubuntu. But to make things easier, I will answer it here.
Use your favorite text editor to open /etc/fstab (WARNING: Be very careful when editing this file. It controls how your system mounts filesystems on boot).
Find the line for /dev/sda1 At the end of the line, you should see a 1, or 2. Change this to a 0. This tells the system to not run fsck whenever it boots.
ctrl+alt+f2 or f3
login with your account
type sudo apt-get update (enter password when prompted)
type sudo apt-get install xserver-xorg-video-intel
reboot
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
yesterday i was shown that i can't unmount a mounted partition (like /media/test or /mnt/test) if someone is using the terminal in that directory (maybe in ssh connection).
he used a command that listed the user on that directory with pid of process in order to kill the pid and unmount the partitions.
I don't remember the command, could you help me?
ty
This one works nice:
lsof | grep '^bash.*cwd'
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 7 years ago.
Improve this question
I am looking to increase the default size of the scrolling up buffer from linux command line. It is a Debian server without gui.
I don't find related option in bashrc and I don't even know if there is other configuration file for the default prompt alt+f1 alt+f2 ...
You can change the scrollback-buffer size using kernel options as described here: https://wiki.archlinux.org/index.php/Scrollback_buffer .
However, if you are interested in the output of a command but at the same time you want to watch the command's progress interactively I suggest to use tee:
command | tee out.file
or if you want to append to a file use
command | tee -a out.file
tee is nice! use it! :)
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 8 years ago.
Improve this question
I am just installed Fedora20 in VMWare. my computer is win8 64bit. But I can't start Xwindow.
I already login root. try "startx". "command not found". what's mean.How to start Xwindow on Fedora20.
If you have X installed, and everything is more or less "out of the box", then you can shift to runlevel 5.
init 5
Note that it must be ran as the root user.
You did not mention what type of install it was. Providing the X Windows system was installed, you can check the inittab settings by sudo vi /etc/inittab (or cat /etc/inittab if you just want to view it)
You are looking for the last line. It should say " id:5:initdefault: "
In order for Gnome/KDE/etc to load when Fedora starts.
If you edit the file to change the last line, reboot the system and it should open the graphical login.