Cp Write Error Invalid Argument
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow echo write error invalid argument Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is
Fatal Write Error Invalid Argument
a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up bash - echo: write error: git write error invalid argument invalid argument up vote 2 down vote favorite I am new to bash and trying to write a script that disables kworker business as in aMaia's answer here. So far, I have this, which I run from root: 1 #!/bin/bash 2 3 cd /sys/firmware/acpi/interrupts bash echo write error invalid argument 4 for i in gpe[[:digit:]]* # Don't mess with gpe_all 5 do 6 num=`awk '{print $1}' $i` 7 if (( $num >= 1000 )); then # potential CPU hogs? 8 # Back it up and then disable it!! 9 cp $i /root/${i}.backup 10 echo "disable" > $i 11 fi 12 done But running it results in: ./kkiller: line 10: echo: write error: Invalid argument What is going on here? I thought $i was just the file name, which seems like the correct syntax for echo. Suggestions for
Sha1 File Stdout Write Error Invalid Argument
cleaning up/improving the script in general are also appreciated! Update: With set -vx added to the top of the script, here is a problematic iteration: + for i in 'gpe[[:digit:]]*' awk '{print $1}' $i ++ awk '{print $1}' gpe66 + num=1024908 + (( 1024908 >= 1000 )) + cp gpe66 /root/gpe66.backup + echo disable ./kkiller: line 10: echo: write error: Invalid argument bash shell scripting echo sh share|improve this question edited Jan 1 '15 at 21:37 asked Jan 1 '15 at 21:19 nicole 1,16222249 you need to see what value is being stored in $i, add set -vx after the first line of your script. You'll get the shell debug/trace output. I think you'll see that $i will be value like gpe99, which won't work in your test (( $num > = 1000 )). I'm not sure about echo "disable" > $i, so include more debugging output in your question so we can help you. (Cmd executed, and error msg as they occur in your output). Good luck. –shellter Jan 1 '15 at 21:29 add a comment| 2 Answers 2 active oldest votes up vote 0 down vote accepted I think it has something to with permissions. I don't think root has write access to those files by default. Try echoing manually 'disable' to that file, even as root you get the same error shown. So to make your script work, first do chmod 744 on $i before your echo, it should do the trick. share|improve this answer answered Jan 1 '15 at 21:55 MajorT 1439
[x] First Last Prev Next This bug is echo ds1307 0x68 > /sys/class/i2c-adapter/i2c-1/new_device bash: echo: write error: invalid argument not in your last search results. Bug7249 - "write error: Invalid argument" when onlining already onlined CPU Summary: "write error: Invalid argument" when onlining already onlined CPU Status: REJECTED WILL_NOT_FIX Product: Platform Specific/Hardware Classification: Unclassified Component: x86-64 Hardware: i386 Linux Importance: P2 normal Assigned To: Andi Kleen URL: Keywords: http://stackoverflow.com/questions/27734792/bash-echo-write-error-invalid-argument Depends on: Blocks: Show dependency tree /graph Reported: 2006-10-02 15:08 UTC by Bryce Harrington Modified: 2008-09-05 04:09 UTC (History) CC List: 2 users (show) Markus.Rechberger protasnb See Also: Kernel Version: 2.6.18 Tree: Mainline Regression: --- Attachments Add an attachment (proposed patch, testcase, etc.) Description Bryce Harrington 2006-10-02 15:08:11 https://bugzilla.kernel.org/show_bug.cgi?id=7249 UTC Most recent kernel where this bug did not occur: Has been present in the 2.6.17 and 2.6.18 releases, -rc, -mm, and -git trees Distribution: Gentoo Hardware Environment: x86_64, 2x AMD Opteron Software Environment: See http://crucible.osdl.org/runs/2328/sysinfo/amd01.1/ Problem Description: In testing hotplug cpu recently, I notice a discrepancy in how it's handled on x86_64 vs. other architectures. Normally, if you attempt to online an already onlined cpu, it returns an exit code of 1 but no error message. However, on x86_64 it produces this error message: x86_64: # echo 1 > /sys/devices/system/cpu/cpu1/online -bash: echo: write error: Invalid argument # echo 0 > /sys/devices/system/cpu/cpu1/online # echo 0 > /sys/devices/system/cpu/cpu1/online -bash: echo: write error: Device or resource busy # echo 1 > /sys/devices/system/cpu/cpu1/online # echo 1 > /sys/devices/system/cpu/cpu1/online -bash: echo: write error: Invalid argument I think it should not be printing an error message in this case. Here is sam
Search HCL Search Reviews Search ISOs Go to Page... LinuxQuestions.org > Forums > Linux Forums > Linux - General Invalid argument when using cp -p to nfs mount User Name http://www.linuxquestions.org/questions/linux-general-1/invalid-argument-when-using-cp-p-to-nfs-mount-474006/ Remember Me? Password Linux - General This Linux forum is for general Linux questions https://community.emerson.com/networkpower/support/avocent/serial/cycladesacs/f/178/t/1750 and discussion. If it is Linux Related and doesn't seem to fit in any other forum then this is the place. Notices Welcome to LinuxQuestions.org, a friendly and active Linux Community. You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our write error newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today! Note that registered members see fewer ads, and ContentLink is completely disabled once you log in. Are you new to LinuxQuestions.org? Visit the following links: Site Howto | Site FAQ | Sitemap | Register Now If you have any problems with the registration write error invalid process or your account login, please contact us. If you need to reset your password, click here. Having a problem logging in? Please visit this page to clear all LQ-related cookies. Introduction to Linux - A Hands on Guide This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter. For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own. Click Here to receive this Complete Guide absolutely free. Search this Thread 08-15-2006, 06:21 AM #1 Stuart65 LQ Newbie Registered: Aug 2006 Location: Frankfurt, Germany Distribution: SUSE & SLES Posts: 5 Rep: Invalid argument when using cp -p to nfs mount Hi, I'm attempting to copy a file to an n
participation - click to join Options Share RSS More Cancel ACS48 - configuration not saved Hello,I have a problem with ACS48 - configuration is not stored after reboot. If there is only network configured (for. ex. using "wiz") and thave save is issued it works fine and the config is saved even after reboot. But when I import our configuration for ports used, then the configuration is not stored (and even network settings are "forgotten" after reboot).I do receive this error, there is no difference if I save it from CLI or just issue the "saveflash" command. From GUI after apply there is no error message, but it's not stored as well.I can see the ports conf in pslave.conf, but it is not stored in the .save file.Do you have any ideas?Thanks a lot, BR, Jancli>configconfig>savetoflashChecking the configuration file list...Compressing configuration files into /tmp/saving_config.tar.gz ... done.Saving configuration files to flash ... cp: Write Error: Invalid argumentdone.config> [ericsson@cserv1 ericsson]$ ls -l /etc/portslave/-rwxr-xr-x 1 root root 451 Mar 17 2007 cb_scriptdrwxr-xr-x 2 root root 1024 Mar 17 2007 filters-rw-r--r-- 1 root root 1445 Mar 17 2007 pslave.cas-rw-r--r-- 1 root root 32732 Feb 28 14:49 pslave.conf-rw-r--r-- 1 root root 1863 Mar 17 2007 pslave.ras-rw-r--r-- 1 root root 31129 Mar 17 2007 pslave.save-rw-r--r-- 1 root root 1016 Mar 17 2007 pslave.ts[admin@cserv1 admin]$ df -hFilesystem Size Used Available Use% Mounted on/dev/ram0 59.2M 44.9M 14.3M 76% /none 46.9M 0 46.9M 0% /mnt/RamDB [admin@cserv1 admin]$ cat /proc/versionLinux version 2.6.11 (gcc version 3.3.1 (MontaVista 3.3.1-3.0.10.0300532 2003-12-24)) #0 Fri Mar 16 16:28:11 PST 2007AlterPath-ACS48-Linux V_3.1.0-1 (Mar/16/07) acs48 cyclades archived_user 1 Mar 2011 2:50 PM Cancel 2 Replies Stefan Liedtke 1 Mar 2011 3:00 PM Hi,You would have to make sure that you're on the same firmware version with this ACS as the one you created the configuration back up file with. Also after importing the configuration to the new ACS please issue the following command on she'll: saveconf.Hope this helps.Best regard