The below program redirects all my output to log file. I need to display all the output along with log file. How can this be achieved? Answer You could use tee:
How to start a VM though Vagrant
I have never used Vagrant before. Now, Im investigating to use it for my project. Here is my problem so need some help from every one. Currently , I have a CentOS guest that has been installed via Virtual Machine in MAC host. Im going to install Vagrant into MACbook then I want to use Vagrant command line for…
Memory Usage abnormal on CentOS
I have VMWare install CentOS 5.5 and deploy some java application. I want to know how much memory remain, As I use command below, All memory is use. But when I check with top command, all process use “0.0%” of memory. So I want to know what happen? What really memory usage on this VM? Regards, Sat…
extract some part of a list of strings and set them in a list without any repetition
I have a list of file names I have tried to extract the index between sil. and .asc and put them in a list while I do not to have the repetition of indexes in my list. The following is some part of the list of my files. The following code is my attempt to make the list but it
How to install man page for Maven on linux?
I am using linux(mint mate), and installed maven by download & unzip & config the environment, I could use the mvn command. I want to have man mvn, not just mvn -help, any tip? @Update: To make the question clear, there is no man page for mvn, because I install maven by unzip, so I want to install man…
Use of $- in shell script
What is use of $- in Unix. In My system, the output is, what is meant by himBH? what it stands for. Thanks in Advance… Answer It returns the current shell’s flags. The $- variable contains the shell’s flags currently active in your terminal. These flags determine how your shell will function…
grantpt report error after unshare
I have a small program, which tries to create a pseudoterminal after unshare. the output is: The Code: If I remove flag |= CLONE_NEWUSER;, there is not error reported. Can you help to explain why this happens? thanks in advance! Answer Since I’ve had the same issue I have also looked into this. Here are…
Network port open, but no process attached?
When I check my server, I found some strange ports: No program can be found in the output of netstat -tulnp(with root privilege). How could I find the usage of these ports? How could I judge it’s safe or not? OS: CentOS 5.6 x86_64 Kernel: 2.6.18-238.el5 #1 SMP Thu Jan 13 15:51:15 EST 2011 x86_64 x86_64 …
Where & How is user group information stored in Ubuntu?
Mirror Question: https://unix.stackexchange.com/questions/217300/where-how-is-user-group-information-stored-in-ubuntu. (I’ll remove one of them after I got the answer) Two places possible: /etc/group and /etc/passwd. If I use command: adduser [username] [groupname], then the user would be added to the g…
Proper error handling for fclose impossible (according to manpage)?
So I’m studying fclose manpage for quite I while and my conclusion is that if fclose is interrupted by some signal, according to the manpage there is no way to recover…? Am I missing some point? Usually, with unbuffered POSIX functions (open, close, write, etc…) there is ALWAYS a way to reco…