11-16-2016
Quote:
Originally Posted by Corona688
You're very, very close - close enough that I wonder if this is permissions issues rather than program ones... Or, perhaps, parts of the program we didn't see, preventing it from working.
You were correct btw, the way it was originally written was trying to access linux root directory.
Quote:
Originally Posted by jlliagre
By the way, although I don't think this is the issue, you shouldn't double the directory separators:
Interesting, strangely it works both ways.
Quote:
Originally Posted by RudiC
WHAT doesn't work? Any error messages? Odd behaviour? Is the source file correctly located/found (in the current working directory)?
No errors everything compiles fine, just can't get it to move up
the directory tree 2 levels.
seems the best I can do is
cp file ../ and move up one directory. I may have to rearrange my directory structure to get this to work in linux. Thanks for all your suggestions
Last edited by rbatte1; 11-16-2016 at 09:30 AM..
Reason: Added ICODE tags
10 More Discussions You Might Find Interesting
1. IP Networking
Ok, here at work, we have Windows computers which login into a MS domain server.
Some of us also have Linux boxes which get a ip address
from the dhcp server. We can see other boxes and see the internet until about 1 week ago.
Now, we still get a ip address but can't see anything within our... (3 Replies)
Discussion started by: natter
3 Replies
2. Linux
Hi,
I've setup an FTP server on my linux box (RH 9.0). I've configured so the vsftpd daemon is running in runlevel 5, etc.
However, I have difficulty logging-on, as it will not authenticate any valid user (inlcuding anoymous). Everything seems ok in the /etc/vsftpd/vsftp.d.conf and... (4 Replies)
Discussion started by: Breen
4 Replies
3. IP Networking
We have set-up a FTP server on a Linux machine, which sits behind a firewall. Most users outside our firewall can access it, but one user in particular cannot. I assume it has something to do with their firewall rules. It appears that they can connect with no problem but the server does not grant... (1 Reply)
Discussion started by: Breen
1 Replies
4. UNIX for Dummies Questions & Answers
Hello!
Unfortunatly i'm totaly new with UNIX and LINUX...
Actually Problem is i have some data on floppy disk which was written on UNIX system 5 version now i have installed LINIX ver 9 is there any way i can access unix data on linux 9?
if so please reply me with commands i shall be very... (2 Replies)
Discussion started by: xohaib
2 Replies
5. IP Networking
I have installed linux in my virtual PC under my windows system.
I am trying to access it via windows using putty but i couldn't do so. Could you please help me gurus. (4 Replies)
Discussion started by: Krrishv
4 Replies
6. Red Hat
Dear all
i hav dual operating system ie windows 2003 and Red Hat Advance Server3
trying to mount windows partition on linux operating system using the following method
1)mkdir /mnt/windows
2)mount -t ntfs /dev/hda1 /mnt/windows
mount: fs type ntf not supported by kernel
and my kernel... (2 Replies)
Discussion started by: maooah
2 Replies
7. UNIX for Dummies Questions & Answers
Hello all
I searched the net but didn't found any application that wrap ssh connection with GUI interface so that non techie
people can connect to unix/linux accounts and work with files , so it will looks like there familiar Microsoft windows directory structure .
Please don't answer with ..... (6 Replies)
Discussion started by: umen
6 Replies
8. Linux
I am facing a strange issue in connecting to Oracle database from Linux Machine
- The connectivity is not failing all the time , the failure to success ratio is 1:70.
- Error "ORA-12545: Connect failed because target host or object does not exist"
- Majority of the time the connection... (6 Replies)
Discussion started by: balaji kumar
6 Replies
9. Shell Programming and Scripting
Hi Guys,
I need to access multiple directories whcih is following similar structure and need to copy those files in desitination path.
for eg :
if ]
then
cd ${DIR}/Mon/loaded
echo "copying files to $GRS_DIR"
cp * ${DIR}/Mon/
echo "Files of Monday are Copied"
fi
if ]
then... (5 Replies)
Discussion started by: rohit_shinez
5 Replies
10. UNIX for Dummies Questions & Answers
Hi,
First server every thing is working but keeps crashing so to be on the safe side created second server and moved all the files. But I notice there is a " dot " at the end. See below. Not sure what that means. Also getting 403 on Apache. Please see below. Thanks you so much.
ls -l... (4 Replies)
Discussion started by: samnyc
4 Replies
LEARN ABOUT CENTOS
shell-quote
SHELL-QUOTE(1) User Contributed Perl Documentation SHELL-QUOTE(1)
NAME
shell-quote - quote arguments for safe use, unmodified in a shell command
SYNOPSIS
shell-quote [switch]... arg...
DESCRIPTION
shell-quote lets you pass arbitrary strings through the shell so that they won't be changed by the shell. This lets you process commands
or files with embedded white space or shell globbing characters safely. Here are a few examples.
EXAMPLES
ssh preserving args
When running a remote command with ssh, ssh doesn't preserve the separate arguments it receives. It just joins them with spaces and
passes them to "$SHELL -c". This doesn't work as intended:
ssh host touch 'hi there' # fails
It creates 2 files, hi and there. Instead, do this:
cmd=`shell-quote touch 'hi there'`
ssh host "$cmd"
This gives you just 1 file, hi there.
process find output
It's not ordinarily possible to process an arbitrary list of files output by find with a shell script. Anything you put in $IFS to
split up the output could legitimately be in a file's name. Here's how you can do it using shell-quote:
eval set -- `find -type f -print0 | xargs -0 shell-quote --`
debug shell scripts
shell-quote is better than echo for debugging shell scripts.
debug() {
[ -z "$debug" ] || shell-quote "debug:" "$@"
}
With echo you can't tell the difference between "debug 'foo bar'" and "debug foo bar", but with shell-quote you can.
save a command for later
shell-quote can be used to build up a shell command to run later. Say you want the user to be able to give you switches for a command
you're going to run. If you don't want the switches to be re-evaluated by the shell (which is usually a good idea, else there are
things the user can't pass through), you can do something like this:
user_switches=
while [ $# != 0 ]
do
case x$1 in
x--pass-through)
[ $# -gt 1 ] || die "need an argument for $1"
user_switches="$user_switches "`shell-quote -- "$2"`
shift;;
# process other switches
esac
shift
done
# later
eval "shell-quote some-command $user_switches my args"
OPTIONS
--debug
Turn debugging on.
--help
Show the usage message and die.
--version
Show the version number and exit.
AVAILABILITY
The code is licensed under the GNU GPL. Check http://www.argon.org/~roderick/ or CPAN for updated versions.
AUTHOR
Roderick Schertler <roderick@argon.org>
perl v5.16.3 2010-06-11 SHELL-QUOTE(1)