General :: Mkdir Won't Work In A Script But Works On Command Line

Feb 4, 2010

Code:

This won't work in a script but it WILL work on the commandline...

Here is my output when I try the script:

Code:

Also, what is the at the end of the path in the error?

View 3 Replies


ADVERTISEMENT

Programming :: Command Line Works - Won't Work From Inside Bash Script

Feb 16, 2011

Writing script to create backup of file by adding datetime to file name. Basically test for file presence if there, cp with datetime then rm original cp works fine from command line but get cannot stat `full path to file': No such file or directory

Code:

Here are the errors: cp: cannot stat `~/html/CVP_dadamail/.dada_files/.logs/errors.txt': No such file or directory rm: cannot remove `...': No such file or directory

The for statement is a placeholder as I have same file to backup out of several directories. using "bash -x scriptname" -OR- inserting echos, I can see I've constructed the strings properly. Believing it might be related to the hidden directories, I tried setting the shopt "glob" options to no avail.

Ultimately I'll add the other directories to the for loop and then run this from a cron job, so if you see potential pitfalls knowing I'm headed in that direction...believe construct would be

Code:

View 4 Replies View Related

General :: CIFS Mounting Works Via Command Line - Fails With Fstab

Dec 2, 2009

I've successfully mounted a network share with mount.cifs for the past 2 years using fstab with credfile.

[Code]....

Yesterday I moved this system to a new datacenter, but did not alter fstab or the credfile. The //server/share directory has IP rules in place, but this was updated with the new system IP while we moved the system. Now, I am mysteriously unable to automount //server/share. The local error is 13 (permission denied). The Windows server we are mounting returned a code that is defined as "username is valid but password is incorrect" Again - no changes (content or permissions) were made to my credfile or fstab entry. I've restarted netfs a few times, including rebooting the system twice. What is baffling is I can successfully mount //server/share via command line: Code: mount -t cifs //server/share /mnt/mycooldir -o username=foobar,password=1234

The username and passwords are identical in credfile and the mount options - I copied & pasted username / password from the credfile itself.

View 2 Replies View Related

General :: How To Give Options Like '-v' For Mkdir Using System Call Mkdir()

Feb 5, 2010

I've written a program which creates a directory using the system call mkdir()

How can i execute 'mkdir -v' using this system call? is there another system call to include options?

View 2 Replies View Related

General :: Error When Issuing Mkdir Command

Sep 8, 2010

I just rebuilt my system from cd CentOS5.5

Went to make a dir and got this...

The command took a while to come back. I googled it but nothing came back.

Could this be hadw error? The drive is new. I was able to issue the command again and have it work.

View 2 Replies View Related

General :: Permissions Command - Cannot Mkdir On An Ancillary HDD

Aug 7, 2011

I cannot mkdir on an ancillary HDD

[Code].....

View 2 Replies View Related

General :: How To Install Downloaded Files - MKDir Command

Jan 11, 2010

"You'll probably want to operate from inside your home directory. If your user is (for example) username, your home directory will be /home/username/. For the rest of this section we will assume you have downloaded your zip file to /home/username/src. If you do not have a src directory, you can create it with the following "mkdir" (make directory) command:"

Where do the commands go? I cant make it work in terminal. How do I get back to "home" from where i am now? example /home/mydesktop/. I am working in mydesktop. I have downloaded some packages that pkcon search will not find, but when I try to install them using "synaptic" it cant find the packages i dl. So I found this tutorial.

"So, we have our source package in /home/username/src/.
Change to the /home/username/src/ directory with the "cd" (change directory) command like so: cd /home/username/src/
but I dont know where to write the commands.

View 7 Replies View Related

General :: Mkdir In Bash Script - Command Substitution

Jun 26, 2010

I was to set up a cronjob that sends its output to a logfile, i want that log file to be unique. the easiest way to set this up would be to make the directory in the script, then output the command to that directory, they call that directory via is full path in cron (because cron only uses full path names.

This does not work

keep in mind the command "/bin/mkdir -p /tmp/pw_log/`date +20%y%m%d_%H%M%S`.log" works fine on the command line - but once I put it in the shell, it does not work.

View 3 Replies View Related

Ubuntu Networking :: Ad-Hoc Works With GUI But Not Command Line

Jul 17, 2010

I have two Roboards that need to communicate with one another. I have sucessfully installed Ubuntu 9.04 using the 386 kernel based on instructions found online.I can use the GUI to set up an Ad-Hoc network using one Roboard ("Create New Wireless Network"), call it Manet, and connect to "Manet" using the GUI on the other Roboard and ping/ssh between the boards. However, when I try to create the same wireless network using the command line using:

ifconfig wlan2 down
iwconfig wlan2 key off essid 'Manet' channel 5 ap any
ifconfig wlan2 up

I don't see any entry in iwconfig under "Cell". It keeps giving me "Not Associated"When I try to enter the same information on the other Roboard to try to connect to the network, it doesn't connect and under iwconfig, I don't even see any entry for ESSID. Could somebody please tell me why it works when I use the GUI and not the command line.

View 1 Replies View Related

Ubuntu :: FTP Works Through Command Line - Not From Nautilus

Jan 28, 2011

Does anyone know why Nautilus would allow me to login to a server but not display any files, but when I log in via the 'ftp' command-line binary, it works and allows me to display all the files, make directories, etc.? I was able to login via FileZilla too.

Here's part of the log:
Code:
Response:220 Microsoft FTP Service
Command:USER ----
Response:331 Password required for ----.
Command:PASS ***********
Response:230-Welcome to the Alentus FTP server.
Response:230 User ---- logged in.
Command:SYST
Response:215 Windows_NT
Command:FEAT
Response:211-FEAT
Response:SIZE
Response:MDTM
Response:211 END
Status:Connected
Status:Retrieving directory listing...

View 1 Replies View Related

Ubuntu :: Mail() Works In Command Line But Does Not In Browser?

Jun 18, 2011

I'm trying to configure sending mail from my site under Ubuntu 10.04 LTS.I have installed LAMP and postfix. To test mail I created the file test.php with code:

PHP Code:
$to = 'mymail@gmail.com';
$subject = 'The subject';

[code]....

View 1 Replies View Related

Server :: Crontab Fails But Command Line Works ?

Feb 19, 2011

Having an odd problem running a mysqldump via crontab. I have the script running on other servers and they work fine, so not sure how to actually troubleshoot, but the script looks like the following;

If I run it as a cronjob as root, it finishes in a second and a 20k file is there. If I run it from the command line as root it does the backup (takes a few minutes) but does complete the backup and can be unzipped and read successfully.

View 3 Replies View Related

Server :: Gawk Works From Command Line But Not From Cron

Jun 5, 2010

I have a very simple gawk script to add commas to numbers to make them more readable:

It works perfectly from the command line, but when run from cron it doesn't add the commas.

View 2 Replies View Related

General :: Printing From Command Line Won't Work - Just Sits In Print Queue

Apr 3, 2011

CUPS was not originally installed on my server, I have installed it but cannot print to my network printer. On my laptop, I can... they are both running the same version of Debian. What could be missing?

Here are some details...

I have two computers running the same version of Debian. One is a server with no GUI and the other is my laptop with GDM installed. My laptop (which prints with no problem) is connected via Wifi. My server is connected directly to the router via Ethernet. I cannot print from the server.

The printer is a Canon Pixma MP495 that connects to the router via Wifi. I have downloaded drivers for the printer from [url] and installed them successfully using dpkg on both computers.

Right now I have a regular text file that I am using for a test page. To print from my laptop (with success) I type:

Code:

This does not work from the server. What could I be missing?

lpq run on server:

Code:

lpinfo readout:

Code:

View 14 Replies View Related

Software :: Command Line Browsing That Works With JavaScript Sites?

May 9, 2011

How can I verify JavaScript on a site (not on the same server) is working from command line access of the URL?

On checking some of what was written in 2005 I find most of it isn't still relevant (if it was then - I noted the w3m-js stuff mentioned in 2005 hadn't been updated since 2003).

Since then a couple of times I've looked into it but didn't make much headway but also didn't spend a lot of time on it. So far as I could tell from other posts I'd seen others hadn't either.

Recently I found out about Mozilla's SpiderMoneky js library and that it could be linked into elinks text browser and did same on my RHEL5 system.

I found Spidermonkey rpms in the EPEL (Fedora sponsored) repository:
js-1.70-8.el5.i386.rpm
js-1.70-8.el5.x86_64.rpm
js-devel-1.70-8.el5.i386.rpm
js-devel-1.70-8.el5.x86_64.rpm

I was able to download and install using rpm then compile elinks from source to include the above. Running elinks version after that shows the ECMAScript support is compiled into the new elinks binary. Also setting various ecmas* flags in the elinks.conf does have effect so clearly it is using them. (As opposed to another system where I use the original RHEL5 provided elinks RPM it complains about the ecmas* stuff being invalid options.)

It appears that by default it has this enabled but just for good measure I added:

set ecmascript.enable = 1.

Despite that when I pull up the page I see:

This product requires use of a browser that supports JavaScript

As a test I set the above to 0 on the off chance it was backwards and saw the same thing.

I then set the following:

set ecmascript.error_reporting = 1

On pulling up the page I now see a popup box:

Quote:

JavaScript Error:

A script embedded in the current document raised the

following exception:

TypeError: Window.Focus is not a function

OK

That seems to suggest that despite the earlier message about needing a browser that supports JavaScript that it is in fact executing at least one JS but that it is getting an error. Can anyone confirm that?

Does anyone have any idea what I�d need to do to deal with the Window.Focus message?

Essentially the site is a login page and even though I am able to input username and password after opening in browser when I tell it to POST it simply returns to the same login/password page.

And of course it doesn't have to be elinks/spidermonkey. I'd be interested in finding out if anyone knows a way I can verify a site that is running JavaScript is actually responding properly from command line rather than via a browser?

The SpiderMonkey stuff from Mozilla when compiled into elinks is supposed to do that but given my results Im not sure if it is or not.

Most of the documentation I can find on JavaScript stuff appears to be aimed at developers testing their own JS code from command line rather than accessing a web page with JavaScript.

View 8 Replies View Related

Programming :: BASH - Works On The Command Line, Hangs As A Script?

Jul 16, 2010

I'm writing a Bash script to take IPTC keywords from a text file and write them, via Exiv2, to several (first batch is 100) JPEG files in a single directory. The script has one while loop inside another while loop, both terminated, but I'm pretty sure that's not my problem. I think it's how I'm incrementing the "counter" variable, although it could also be the method of parsing the text lines from the file (using cut with delimiters that have worked fine in simpler scripts).

Here's the code as I've worked it up to this point.

Code:

And yes, "keywords" checks out in Crimson Editor, Emacs GUI and nano as an ASCII file with UNIX line endings. No issues on that score.

Feeding each line consecutively into a terminal (excepting the exiv2 command) works fine: each variable echoes with the part of the text line used as a variable value as it should, even when the b variable is incremented the quick&dirty way (up arrow three commands and hit enter).

Running the above script in eval mode (sh -x) stalls after setting the b variable to one and reading in the first line of text. I'd like to know why. I'd also like some advice on another reliable method of parsing the read-in lines.

View 14 Replies View Related

Slackware :: Can't Find Pdf Reader That Works In Command Line Mode

May 13, 2010

So, in finishing my nFlux slack current edition.I have set it up for users to do certain things in console
and one of the things I want is a way to view slackbook-2.0 in runlevel 3 console.I cant find a pdf reader that works in command line mode and I cant figure out how to either convert slackbook 2.0 pdf into html/text Or find a slackbook download that is html or text?I tried converting it using pdftotext, which didnt work very well So, I need a command line pdf viewer or a converter that works good?

View 5 Replies View Related

General :: Using The Command Line Can Detect Wireless Card And Make It Work Under SUSE Enterprise Desktop?

Jan 26, 2010

How, using the command line can I detect my wireless card and make it work under SUSE Enterprise Desktop? The wireless card works in Win XP.

View 8 Replies View Related

General :: Use Mkdir Command To Create 'local' Directory In /usr - There Are Error - Cannot Make Directory

Jun 16, 2010

I am a student studying computer science course.

Well, I am facing problem when doing lab questions.

I must use DLXLinux bundled in Bochs (bochs.sourceforge.net).

I am required to use the /usr/local directory.

In /usr directory, there is no directory named 'local' but there is one thing called 'local@'. So, when I try to use mkdir command to create 'local' directory in /usr , there are error "cannot make directory.....".

Look at my screenshot at [url].

View 9 Replies View Related

General :: Can't Get Xmms2 "playback" To Work From The Command Line

Feb 11, 2010

Im running opensuse 11.2 with "Lxde". Problem is I cant get xmms2 to work from the command line. I think i need to get mad (mp3) support to work. I installed libmad0 but when I check the installed plugins, theres nothing there to handle mp3's. Heres the installed plugins:

[Code]...

View 2 Replies View Related

Programming :: Firing Some Shell Command Like Ls - Mkdir Dir-name Via Kernel Module

Jun 10, 2010

How can we fire a shell command like ls,./a.out automatically in kernel space via a kernel module ? i.e. replacement of system() function of user space into kernel space.We need to develop a kernel module which can fire some shell command let say "firefox [url]" automatically to open google automatically from module.

View 2 Replies View Related

General :: Command Line Way To View A Line Of A File With Context?

Feb 24, 2011

I'd like show a certain line or lines of a file with context, kind of like a unified diff, on the command line in Linux:

$ (something) -l 154 stuff.py
150: def foo(bar):
151: """

[code]....

View 5 Replies View Related

General :: Printing Command Line History Without Line Numbers?

Aug 22, 2011

How can I print Linux command line history without including the line numbers? I want to send it all to a text file like this:history >> history.txt

View 1 Replies View Related

Programming :: Line That Checks If Dir "TEST" Exists. If So, Nothing, Of Not Mkdir?

Aug 25, 2010

I have a line of code from a csh script:Code:if ( ! -e TEST ) mkdir TESTit checks if the directory "TEST" exists and if it DOES exist then nothing happens, if it DOES NOT exist then directory TEST will be made. Now I want to use this in a sh (or bash) script. Does anybody know the equivalent of the line above for sh?

View 5 Replies View Related

OpenSUSE :: Command Line Applet Does Not Work In 11.4 (gnome)

May 19, 2011

I add a "command line" or "mini-commander" applet to the panel in gnome, but nothing happens.

If I launch "/usr/lib/mini_commander_applet" on a terminal, I get a dozen such applets, for all the times I tried, but then I have an xterm tied up.

If I launch the same from "alt-f2" it does not work, and gives no error.

Carlos E. R. (from 11.2 x86_64 "Emerald" at Telcontar)

View 9 Replies View Related

Ubuntu Installation :: Get Only Boots Into Command Line To Work?

Apr 29, 2011

I did a dist-upgrade this morning, and now every time I boot, it only goes to the command line login prompt.

Attempting to stop and restart gdm does nothing besides make the screen shake for a second, and I've installed all available video drivers from Available Drivers, and the ones from nvidia's website.

I am, however, able to boot into recovery mode and then select failsafe graphics mode, and get into the desktop.

Any ideas how I can get my normal boot to work?

View 1 Replies View Related

Fedora :: Run Python3 Scripts From Command Line And Call Up Python 2.6.2 Idle With The Command Idle From Command Line?

May 29, 2010

i've gotten my fedora 12 to the point where i can run python3 scripts from command line and can call up python 2.6.2 idle with the command 'idle' from command line. what command will call up python3 (3.1.2 to be exact) idle?

View 5 Replies View Related

Fedora :: Get ADF (Auto Document Feeder) On A Printer To Work From Command Line?

May 4, 2010

know how to get ADF ( Auto Document Feeder ) on a printer to work from command line?

Running F12 and my printer is HP OfficeJet 7310xi

---------- Post added at 10:57 PM CDT ---------- Previous post was at 10:17 PM CDT ----------

I found this scanimage -b --batch-scan=yes > output.pnm

View 2 Replies View Related

Fedora Networking :: Set Up Samba Using Command Line Terminal / Network Does Not Work

Nov 29, 2010

I set up Samba using command line terminal, and my network does not work. I have Samba username and keyring passwords all set, then I go to gui system-config-samba, and my samba user profile password is incorrect. In the past, I have used a 10 letter password, however, every time I boot the computer, I have to go back in and re-enter the password.I wonder if samba is truncating the password because it only accepts an 8 character password? I have deleted the user, and added a new username, and it is still doing it.

If I go into the gui and re-enter the password, usually I can get the network back up with my windows machine. All of the parameters are correct, I use the network to transfer files from my Windows to my Fedora drive all of the time when it works.

View 2 Replies View Related

General :: Ubuntu 10.10 And Command Line Scripts - Error - Android: Command Not Found

Mar 26, 2011

I know my way around MS Windows much better, but I just don't feel right trying to program something for Android on a Microsoft operating system. I am interested in Android programming so I followed the instructions on [URL] to install the environment on my computer...

I just installed the JDK, SDK, Eclipse successfully (or I assume):

* When I get to Step 4 where I'm supposed to run 'android' it will not run. I get the error message "android: command not found" (I am definitely in the right directory).

** When I double-click it in nautilus, it opens up in gedit. I can set the permissions in nautilus (through the properties - Allow executing file as a program) and get it to work,

My system:

Intel i7
Ubuntu 10.10 Maverick Meerkat
android-sdk-linux-x86
eclipse 3.6.2

View 5 Replies View Related







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