Fedora Installation :: Run A Shell Script From A Remote File?

Oct 4, 2009

if I wanted to run a shell script from a remote file (say on my desktop) in which when clicked the file the shell script would run how would I do so?In other terms, the file would contain the command: sh /home/Phobos/Documents/jes-4-2-2-nojava/JES.sh

However what extension should the file have in order to run on click?

View 5 Replies


ADVERTISEMENT

General :: Delete A File On A Remote Server Using Shell Scripting?

Jul 18, 2010

delete a file on a remote server using shell scripting.

View 14 Replies View Related

Fedora :: Write A Shell Script That Will Look At Each File?

Jul 23, 2010

I have a number of text files throughout my /home/pjs/Documents directory tree that have execute permissions set. Almost all of my file names have spaces in them. I am trying to write a shell script that will look at each file in my Documents directory, find the ones that have execute permissions set, and run the command chmod 644. Of course, I don't want the command run on the directories.

The following script *doesn't work*, but might serve to illustrate what I am trying to do:

#!/bin/bash
for x in "$(ls -R)" do
if [ -f "$x" ] && [ -x $x ]; then
chmod 644 "$x"
fi
done

I want each file and directory name to be placed, one by one, in the variable $x, and then tested with the "if" conditionals.

The first problem seems to be that, although the command "ls -R" does produce a complete list of the files and directories I need, they are not placed, one by one, in the variable x like I want them to be.

Also, I think I should use the shift command so that the option -R doesn't get included as one of the values of the variable $x, but I can't figure out where to put it.

View 14 Replies View Related

General :: A Shall Script For Remote Shell Execution?

Mar 26, 2011

i need to take the backup some folders encryption formate with password i used gpg encription in the script but it is not taking the password it throos errorthe syntax is#!/bin/bashtar -cvzf test.tar.gz target ; echo "test" | gpg -c test.tar.gz --stdin

View 3 Replies View Related

Fedora Servers :: Create A Backup To A Remote File System?

Jun 26, 2010

Attempting to create a backup script to copy files from one file system to a remote file system.

When I try this I get:

Quote:

# tar -cf - /mnt/raid_md1 | gzip -c | ssh -i ~/.ssh/key -l user@192.168.1.1 "cat > /mnt/backup/fileserver.md1.tar.gz"
tar: Removing leading `/' from member names
Pseudo-terminal will not be allocated because stdin is not a terminal.
ssh: Could not resolve hostname cat > /mnt/backup/fileserver.md1.tar.gz: Name or service not known

[Code].....

I know that the remote file system dir is RW and the access is working fine. I am stumped...

View 3 Replies View Related

General :: Check If Remote Server Is Up - Shell Script?

Sep 10, 2010

I need to add something to an existing shell script that will check whether a remote server is up or not.basically (but I can't figure it out) :-

if [ -the server to check- ] ; then
echo "Server is Up"
else

[code]....

View 12 Replies View Related

Programming :: Write Shell Script To Ssh Into A Remote Computer And Run That?

Jun 26, 2010

How do i write a shell script to ssh into a remote server with password and run a script in it?

View 2 Replies View Related

General :: Detect Remote Logins Within Shell Script?

Apr 19, 2011

I've written a shell script that among other things, restarts network services. As such, I'd like to keep those who are remoting in via putty, etc. from executing the script. Is there a way to detect this and restrict running the script (by adding additional coding in the script) that disallows running it from unless you are logged in directly to the machine? It's written in bash.

View 1 Replies View Related

General :: Use Ssh And Run Command In The Remote Machine Using Shell Script?

Apr 27, 2011

How can i do that.. Today is my first day writing a script.. and correct me if this Thread should be somewhere else..

Code:

if [ $1=$anyvariable ]; then
ssh www.a.com <Have to set few variables and give commands >

View 8 Replies View Related

General :: Move A Process From One Shell To Another (local To Remote)?

Jan 28, 2010

Is is possible to move a process from one shell to another (local to remote)

e.g.

if
my_code.sh &
#jobs
[1]- Running my_code.sh &

was started on one remote shell is it possible to move it to the foreground on another shell as root or another user?

View 5 Replies View Related

Software :: Running X-Server From Remote Shell Session?

Apr 7, 2010

How do I obtain information about the running x-server from a remote shell session? I want to know things like resolution, color depth, etc. My xorg.conf is basically empty. The only thing I can think of doing is to read the Xorg.0.log file which seems inefficient.

I thought that 'xrandr' displayed some text output but that behavior has changed (?). It seems to require an X display. Is there another way? Something I could incorporate into a shell script? (This is Fedora but that shouldn't really matter)

View 1 Replies View Related

Fedora :: Create A Shell Script File With Two Functions - Bash Scripting & /etc/bashrc

Oct 6, 2010

how come I can create a shell script file with two functions, I can execute the file, but when running declare -f, the functions are not on memory, and when invoking the function bash returns invalid. In the other hand, I can copy & paste the two functions at the end of my /etc/bashrc file.... then I can called the function by name.... and the commands within that function run on my session. here is a print of all my bash packets:

[Code]....

Does Fedora has restrictions on shell scripting? I haven't touch bash in seven years, so if things have change on it I'm behind on it, and sorry for my ignorance.

View 1 Replies View Related

Fedora Installation :: VNC Level 3 Installation - Remote Into The System Via My Windows Xp Systems

Sep 15, 2009

What I'm trying to do at this point is setup VNC so I can remote into the system via my windows xp systems. I have VNC installed on those computer and I was able to get GNOME's remote desktop operating when I log in on level 5 and actually logged into my user account. However, when I'm not logged in on level 5 it will reject connections entirely. Ultimately I want to remote into the system using tightVNC and view the level 3 (command line only) thing, and allow me to telinit - 5 to switch to gui if I need it from VNC on the windows system. This way I don't need a monitor, keyboard and mouse plugged into the server. Right now that's what I'm having to do.

The problem is that it doesn't run in level 3 at all and level 5 (gui mode) doesn't work if i'm not logged into an account. So how can I get this to work at as a constant running server no matter what level and login point i'm at? Ultimately for this Linux admin class I have to setup a working server and I figured I'd get a base setup with VNC support that I could log into from school to work off of instead of having to use the local connection. Once I get VNC working on my network i'm pretty sure I can get it working beyond my local network.

Here's some commandline stuff that may diagnose my issues:

Code:

As you can see I'm having issues with the libstdc++ lib being detected. I have it installed, but apparently not everything is setup properly. I also have an RPM file for VNC and I've tried to install it with the gnome shell but it gives me an error: "Can't install /home/[user]/Download/vnc-4_1_3-x86_linux.rpm as no transaction" I'm not sure what that means. When I use the command line I get this:

Code:

View 1 Replies View Related

Programming :: Shell Script To Check Whether Directory Exists On Remote Server

Jan 17, 2011

I am new to scripting, would like to have a script that tests whether a directory exists on remote host & display the message accordingly. The remote hostname can be provided by means of file containing list of hostnames. Can use rsh for connecting to remote host.I tried with couple of scripts by searching google but didn't get desired result. Please help me, below is my efforts, $file contains list of hostnames.

View 10 Replies View Related

Red Hat / Fedora :: Fedora Shell Scripting \ "Find In Curent Folder For Files, And It Copy First File He Find With Name Gived By User?

May 18, 2011

shell scripting in Fedora14I want a script"Find in curent folder for files, and it copy first file he find with name gived by user, if name already exist then echo error message and finish"command usage " bash scriptname copyASname"

smthing like Code: #!/bin/bash
for files in /home/user/*
do

[code]....

View 1 Replies View Related

Fedora :: Cannot Test Proxies, Or Remote File Availability Without Both HTTP::Request:ommon And LWP::UserAgent

Mar 30, 2010

I am trying to istall litb for P2020DS. I got an error the following error:

[hwtesting@HWLSRV1 ~]$ cd /home/hwtesting/ltib-p2020ds-20091119
[hwtesting@HWLSRV1 ltib-p2020ds-20091119]$ ./ltib
Don't have HTTP::Request:ommon
Don't have LWP::UserAgent
Cannot test proxies, or remote file availability without both
HTTP::Request:ommon and LWP::UserAgent

add folowwing line to User Privilage section:

hwtesting ALL = NOPASSWD: /bin/rpm, /opt/freescale/ltib/usr/bin/rpmvisudo

I edit the sudoers by visudo command and insert this line just under the following line:

root ALL = (ALL) All

But still I am getting the following:

Don't have HTTP::Request:ommon
Don't have LWP::UserAgent
Cannot test proxies, or remote file availability without both
HTTP::Request:ommon and LWP::UserAgent

View 4 Replies View Related

Fedora Installation :: Install Fedora 11 In EFI Shell And GPT Partition?

Jan 13, 2010

I download F11 x86_64.ISO and burn it into a DVD, but when I boot my machine with EFI to EFI SHELL, I can't find entry to install F11. Who know how to install F11 in EFI shell and on a GPT partition disk? Is there any guide to do this? BTW, I can successfully install win7 x64 from the EFI shell and install win7 on a GPT disk. but there are some problems when I install F11.

View 9 Replies View Related

General :: Write A Shell Script Which Can Ready Content Of The Folder And Place Files On Remote FTP Server?

May 9, 2011

I need to write a shell script which can ready content of the folder and place files on remote FTP server. I need to make sure that a file that is already placed on remote FTP server is not attempted second time. The file names will be something like Records-2011-05-09. The files will be generated by MySQL every hour.

View 7 Replies View Related

Fedora :: Stuck With Bash Shell / Changing Default Shell To Tcsh?

Mar 14, 2010

I want to change my default shell to tcsh. I used

Code:
usermod -s /bin/tcsh username
command as given at url

But if I open a new shell, it is still a bash shell.

How do I make my default shell as tcsh?

View 6 Replies View Related

Fedora Installation :: Use Tcshell Instead Of Bash Shell?

Nov 24, 2009

how to install and use tcshell instead of bash shell...

I run this command but it still dosent work

# yum install tcsh

after installing I use this command to setting it as a default login

$ which csh

but it not work yet...

View 5 Replies View Related

Fedora Installation :: F15 Yum Update For Gnome-shell?

May 28, 2011

Just did an update to gnome-shell.x86_64 3.0.2-1.fc15 and now the shell extensions don't work.

View 4 Replies View Related

Red Hat / Fedora :: Log Remote Or External Ip Address Of Remote Clients?

Sep 15, 2010

We're using both SuSe and RHEL servers. Our servers are running behind firewall device and remote root login is disabled in SSH.

We're using NAT.

Remote client connections including failed logins are logged into the /var/log/messages but what is logged are gateway ip of our LAN - the LAN IP of Firewall device.

How can I logged the external or public IP of the remote client?

View 4 Replies View Related

Fedora Installation :: Mce Remote Contro Model 1039?

May 27, 2009

I have installed fedora 10 with mythtv. at some point the remote control was working then i had to reimage the computer again. Now the remote wont work Im not a linux guru this is why is so dificult.

i know that it is installed because i do this lsusb and get
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 003: ID 413c:2105 Dell Computer Corp.
Bus 004 Device 002: ID 0471:0815 Philips eHome Infrared Receiver
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

[Code]...

View 1 Replies View Related

Fedora Installation :: Unable To Access Apache From Remote

May 11, 2010

Unable to access Apache from remote server..

Also, my php pages won't load..and php is installed.

View 1 Replies View Related

Fedora Installation :: Exclude Remote Admin Tools

Mar 30, 2011

Sorry if this is the wrong place to inquire. I was wondering if it is possible to install fedora without any remote administration tools in particular SSH?

View 5 Replies View Related

Red Hat / Fedora :: Installation Of Php - Platform With Remote Postgresql Support

Oct 18, 2010

I have two machines. One is for web server and the other is for database server.I need to install php in the web server and postgresql in the database server. I installed postgresql. But could not install php as it needs postgresql library during configuration steps.

View 1 Replies View Related

Ubuntu :: Shell, Auto Append Number To File And Read From External File?

Oct 31, 2010

Code:
cat ${SOURCE}/{start,universal,index,end}.txt > ${SERVER}/index.html
cat ${SOURCE}/{start,universal,02042010,end}.txt > ${SERVER}/02042010.html

[code]....

View 3 Replies View Related

Fedora Installation :: Bash Shell Could Not Find Kfontview Command

Apr 5, 2009

Bash shell could not find "kfontview" command, although kdebase-4.2.1-2.fc10.i386 already installed?

View 2 Replies View Related

Fedora Installation :: Install Korn Shell Without Internet Access?

Jun 14, 2009

I work for AT&T and our Windows-centric workgroup is being tasked with supporting an app running on RedHat. To help my coworkers, I'm building a Fedora 11 VM that we can play with to familiarize ourselves with the UNIX environment.

Because of corporate network policies in place, my VM can't get access to the Internet.

Since we're AT&T employees, we're naturally using the korn shell on the production system. I'd like to install the korn shell on my VM. However, it doesn't appear to be part of the base fedora repository.

Is the korn shell available for Fedora? If so, how would I copy it to shiny media, mount it on my VM, and install it?

View 4 Replies View Related

General :: Read .gz File Direct On Shell/terminal Without Decompressing The File?

Dec 9, 2008

How can I read .gz file direct on shell/terminal without decompressing the file?
satimis

View 5 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved