Linux: September 2017 Archives

Screen reattach a session

user-pic
Vote 0 Votes

Useful when connection drop

screen -Dr
Reattach a session. If necessary detach and logout remotely first.

screen -DR
Attach here and now. In detail this means: If a session is running, then reattach.
If necessary detach and logout remotely first.
If it was not running create it and notify the user. This is the author's favorite.

curl -T to PUT file to PHP

user-pic
Vote 0 Votes

Sender
curl -T file http://host/upload.php

Receiver upload.php code
if ($_SERVER["REQUEST_METHOD"]=="PUT") file_put_contents(date("YmdHis") ,file_get_contents("php://input"));
// date("YmdHis") is output filename

Eanble tftp server in CentOS7

user-pic
Vote 0 Votes

yum -y install tftp-server

Edit /etc/xinetd.d/tftp, add -c if need create (put file in)
server_args = -cs /var/lib/tftpboot

systemctl enable tftp.socket
systemctl start tftp.socket

PS. xinetd is not necessary

About this Archive

This page is an archive of entries in the Linux category from September 2017.

Linux: December 2016 is the previous archive.

Linux: November 2017 is the next archive.

Find recent content on the main index or look in the archives to find all content.

Linux: Monthly Archives

Monthly Archives