4,082 reputation
512
bio website systemajik.com
location Gatineau, Canada
age 59
visits member for 3 years, 6 months
seen 2 days ago
I have over 30 years experience in all phases of software development and delivery. I have administered a variety of midrange servers, and worked with systems from PCs to Mainframes.

2d
comment One-way-sync a directory, but leave deleted files deleted on the destination
@maxschlepzig See my edit for three options. (One is to use a tool more appropriate for incremental transfers.) Rsync is not designed to automatically handle your use case.
Apr
29
comment How to grab the oldest unread message from `mail` in a script?
@warren Your mail server should be configured to deliver to a certain type. The mail command reads from the users inbox in /var/mail. Maildir delivery uses a directory tree, usually called Maildir and locate in the user's home directory. I haven't knowingly worked with the third format.
Apr
23
comment Forward Only Email Server
It doesn't appear the server is receiving any messages. Try using telnet to diagnose. SMTP is a conversational protocol easy to emulate using a terminal session. For GMail, you likely want to setup an authenticated outgoing connection.
Apr
23
comment How to detect the incoming httpd Connection Counts of each VHOSTS?
@夏期劇場 Using the server-status modules output will give the current state when run. I have updated my response accordingly.
Apr
9
comment Removed /var/lib. Can't open Desktop
@Joshua You may be able to work around the failure to fetch the file by using wget to fetch it. Then you can use dpkg -i to install. The essential packages are the critical ones. You should be able to get a list with the command aptitude search ?essential. The base-files package is likely the most important.
Apr
9
comment Removed /var/lib. Can't open Desktop
@Joshua Pipe the output to less by adding | less to the command. You can use the list to reinstall the packages by piping to xargs -n1 aptitude reinstall instead.
Apr
8
comment Removed /var/lib. Can't open Desktop
Try reinstalling base-files then retrying reinstalling the essential packages. You are likely to encounter some more dependency failures. You can also try a -force option to reinstall anyway.
Apr
4
comment How to keep Bash running after command execution?
@pawel7318 You can kill the background program with the command kill % or kill %1.
Mar
29
comment SSH E-mail login alert if SSH port is as NAT
@Mato If you are running a tool to snoop the SSH session just have it email on connection, or wrap it and log as in the second case.
Feb
18
comment 403 Forbidden, Tried everything
Yes, I was upgrading to 2.4 when this happened. Only one Alais failed.
Feb
11
comment How do I identify the user that is attempting to create a file?
@Gn13l Try using man -k to find the correct documentation and man to display the document. man grep should display the documentation for grep. The getent database is passwd. man 5 passwd should describe the output.
Feb
7
comment How do I identify the user that is attempting to create a file?
@Gn13l Usually I use the command ps -ef | less and look for the web server process(es). The command will list the userid of the process. You can grep /etc/passwd for the user id to find the UID, or use the getent command to do the lookup.
Feb
5
comment How do I identify the user that is attempting to create a file?
Execute controls access to files. If you know the name you can read a file with just the execute bit set. I believe the execute bit is required to verify allow access the file, and write to create the directory entry.
Jan
23
comment How to check if NTPD updates Linux machine's time successfully using shell?
@dvc The scripts there don't seem to include the requested functionality. There seems to be some code to generate SNMP traps, but I haven't encountered SNMP to monitor NTP. I've had to do my own monitoring in several large organizations.
Nov
21
comment How does ifconfig find a machine's external IP address?
@badcook ifconfig normally won't know if your public IP address is already taken. See my edit.
Nov
13
comment Can I somehow add a “&& prog2” to an already running prog1?
I am qualifying the answer. A plain wait will fail to provide the desired result. It is common to use the short forms as they are less prone to typos.
Nov
13
comment Can I somehow add a “&& prog2” to an already running prog1?
There are a number of short forms for entering the PID of the backgrounded process such as %, %1 and $!. It is important to supply the PID or the second command will always run.
Nov
13
comment Can I somehow add a “&& prog2” to an already running prog1?
Waiting on the command should do the job.
Nov
11
comment Can I somehow add a “&& prog2” to an already running prog1?
@slm using wait as a solution.
Nov
11
comment Can I somehow add a “&& prog2” to an already running prog1?
@slm return status on the backgrounded command will only be available if no other command is run in the background after it. The variable containing the return status is not $?.