Created
May 26, 2016 05:06
-
-
Save syamsathyan/4a87681a8bad1a425853fd9ac2bd44f5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from fabric.api import cd, env, run | |
def BF(): | |
env.hosts = [''] | |
def GBL(): | |
env.hosts = [''] | |
def free(): | |
run('free -h') | |
def list_dir(dir_=None): | |
print("************************** Listing Files in Dir - %s" % (dir_)) | |
string = run("for i in %s*; do echo $i; done" % dir_) | |
files = string.replace("\r","").split("\n") | |
return files | |
def listWebContent(): | |
"""List Web Content""" | |
run("cd /nginx/html") | |
list_dir("/nginx/html/") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment