Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: How to take the tar backup files form remote server to local server
Post: How to take the tar backup files form remote serve...

import os, subprocess, psutil import sys import tarfile COMMAND="ls -la" HOST=input("Please enter old server: ") ssh_option="-o StrictHostKeyChecking=no" ssh = subprocess.Popen(["ssh", ssh_option,"%...
sivareddy General Coding Help 0 1,871 Jul-14-2021, 01:32 PM
    Thread: file handling
Post: file handling

import os, sys from subprocess import Popen,PIPE myfs=input("myfs=") try: #grep myfs /etc/fstab p1 = Popen(['grep',myfs,'/etc/fstab'], stdout=PIPE) p1.communicate()[0].decode('utf-8').split()[1] ...
sivareddy General Coding Help 1 1,602 Feb-23-2020, 02:02 PM
    Thread: execute linux command with arguments
Post: RE: execute linux command with arguments

now it's working fine. Thanks
sivareddy General Coding Help 2 2,201 Feb-10-2020, 03:23 PM
    Thread: execute linux command with arguments
Post: execute linux command with arguments

import subprocess myname=raw_input("myname=") subprocess.call(["pvcreate","/dev/",myname])Output:[root@xxx siva]# python test1.py myname=sdc Device /dev/ not found. Device sdc not found.we are get...
sivareddy General Coding Help 2 2,201 Feb-10-2020, 02:56 PM

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020