General :: Dd Command Fails "truncating If Try Same Command With Less Value"

Mar 22, 2010

dd if=/dev/zero of=/var/images/abc.img bs=1M count=0 seek=2097152 dd: truncating at 2199023255552 bytes in output file `/var/images/abc.img': File too large

The dd commad fails here saying its truncating if I try same command with less value for seek it works dd if=/dev/zero of=/var/images/abc.img bs=1M count=0 seek=2088960

0+0 records in
0+0 records out
0 bytes (0 B) copied, 2.1e-05 seconds, 0.0 kB/s

Whats the reason behind this and how can this be solved ? Note that there is 3.9T available on disk for the above commands to execute.

View 4 Replies


ADVERTISEMENT

General :: ImageMagick Command Sometimes Fails?

May 5, 2011

I have an ImageMagick command that is something like this:

convert "/path/to/photo" -set comment "(c) my company" -resize WxH miff:- | composite -dissolve 30 -geometry +40+138 -quality 80 "/path/to/logo.miff" - jpeg:"/path/to/photo_for_public"

Directory /path/to is mounted over NFS (same network). Some options of fstab that might be helpful:

Both rsize and wsize are 3kB
hard,proto=tcp,timeo=600,retrans=2

Sometimes the imagemagick command fails and produces no file (/path to/photo_for_public might not emerge after command execution). Files might be from 100kB to 10MB. We usually re-run the command for files not generated. Sometimes it fails even twice, so we do it third time (hilariously funny, but even a third run can fail).

Are there any thoughts what may be wrong with my photo-processing setup?

View 1 Replies View Related

General :: Custom Xen Shutdown Command Fails?

Dec 26, 2010

I have a custom command I've made to quickly shut down all of my xen instances.

Code:

[root@LCENT02 ~]# virtdown
-bash: syntax error near unexpected token `2'

As you can see it fails when I try to run it on the command line. It is stored in an ~/.env file in my home directory. What is odd to me is if I open the .env file and copy the command from there and paste it into the command line, it does actually work!

Code:

[root@LCENT02 ~]# for i in `virsh list | grep -v -e Id -e --- -e Domain-0 | awk '{print $1}'`; do virsh shutdown $i; done
Domain 1 is being shutdown
Domain 2 is being shutdown
Domain 3 is being shutdown

And this is how I have the command entered into my .env file:

Code:

alias virtdown="for i in `virsh list | grep -v -e Id -e --- -e Domain-0 | awk '{print $1}'`; do virsh shutdown $i; done

Why would this command work if you paste it onto the command line but not use the custom command virtdown?

View 1 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 :: 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

General :: Append Command Output To File By Giving Command In Terminal?

Jul 3, 2009

I am using openSUSE 10.3.When I install software from tarball then to record time required I send output of date to beg.txt(when installation begins) and end.txt (when installation finishes).How can I append output of date to a file so I don't need two files?

View 4 Replies View Related

General :: Access The Dbxml From The Command Line And It Returns Command Not Found?

Apr 30, 2011

I installed the Berkeley DB on the Ubuntu server and tried to access the dbxml from the command line and it returns command not found

path/to/dir/dbxml-2.5.16/install/bin$dbxml
-bash" dbxml: command not found

Can someone point me in the right direction

View 1 Replies View Related

General :: Set Up New Keybinding For Finding Last Command Executed Using The First Few Characters Of The Command In Csh?

Jul 21, 2010

I want to be able to use Ctrl+R to have reverse-i search. Also if I press Shift+Up Arrow after typing the first few characters of a recently executed command then the shell should complete the command by finding the most recent commmand having the same first few characters.

View 1 Replies View Related

General :: Bash Command History Update Before Execution Of Command

Jun 7, 2010

Bash's command history is great, especially it is useful when adding the history -a command to the COMMAND_PROMPT.However, I'm wondering if there is a way to log the commands to a file as soon as the Return key is pressed, e.g. before starting the command and not on completion of the command (using the COMMAND_PROMPT option would save the command once the prompt is there again).

I read about auditing programs like snoopy and session recorder like script but I thought they're already too complex for the simple question I have. I guess that deactivating that script logs all the output of the command would lead already in the right direction but isn't there a quicker way to solve that probelm?

View 1 Replies View Related

General :: How Does Cp Command Determine Source And Destination Locations In Command?

Apr 14, 2011

When you run the following cp command in the BASH terminal, how does Linux know which files are the source and which are the destination when copying multiple files from one location to another?How does Linux know that the services, motd, fstab, and hosts files are the source and the /home/fred/my_dir is the destination?This question came up in a Linux class and I was not sure of the answer. I was thinking it is based on the source path entered ending with a file path and the destination being a directory, but was not sure.

View 4 Replies View Related

General :: Redirecting STDOUT Of Previous Command To STDIN Of Next Command

Nov 20, 2009

i'm trying to redirect the output of a command to the input of the next command. not sure if i'm going about this the right way. an easy method would be just to store the output of the previous command in a file and redirect input to read that file, but i'm curious to see if this can be done without writing to any files.

View 9 Replies View Related

General :: What Does This Cryptic Bash Command Mean - Why Command Crashes

Mar 20, 2011

Possible Duplicate: What does this cryptic bash command mean? Why this command crashes Linux? :(){ :|:& };:

View 4 Replies View Related

General :: Remote Command Execution Via SSH And Newgrp Command?

May 9, 2011

Up until now I've been using plink to remotely compile a project I'm working on. But recently the administrator from the remote server updated the distribution and messed up some configurations. My project has a lot of scripts written for tc shell (tcsh), and now the default shell is bash. There is no way to change this. Another problem is that now I need to run newgrp to change my default user group.

So... to work around this problem I've changed my .bashrc to run newgrp and then tcsh. If I do a normal connection using SSH, everything works as expected, but when using plink, or SSH to remotely execute commands, the shell gets stuck on the newgrp command. I think it's because both applications need a return value from newgrp to send the command I need to execute. Remotely running scripts that call a shell also get stuck like newgrp (newgrp also opens a new shell and that's why it gets stuck) my .bashrc is as follows:

Code:

user_grp=`id -g`
if [ $user_grp != 4919 ]; then
newgrp new_group_id
else

[code]....

View 4 Replies View Related

General :: Use This Command It Will Ask The User To Enter Year In Command?

Apr 4, 2011

i want in the website they ask to enter some input.Code:echo -e "<p>Please Enter Year : c</p> "read Yearif i use this command it will ask the user to enter year in command. but what i want is they ask the user to enter year in web browser.

View 14 Replies View Related

General :: Disable The Su Command On A Server So That Users Cant Run The Su Command?

Apr 29, 2010

i want to disable the su command on a server so that users cant run the su command i removed the comment from the 3 and 5 line in /etc/pam.d/su file but it doesnt seem to work the file is shown below

#%PAM-1.0
auth sufficient pam_rootok.so
# Uncomment the following line to implicitly trust users in the "wheel" group.

[code]....

View 8 Replies View Related

General :: Command To Delete Bash Command History?

May 31, 2010

What's the command to delete bash command history?

View 4 Replies View Related

General :: Only Execute 2nd Command On Successufl Execution Of 1st Command?

Aug 19, 2009

I have a script which builds a project and then runs junit tests. However, if the build fails, the junit tests fail with the same error message.Therefore the command which runs the junit tests should only be executed if the build was successful.

View 3 Replies View Related

General :: Redirecting Command Output To Input Of Another Command?

Jul 2, 2011

I want to run gsettings list-schemas (which return a list of about 100 names separated by spaces)and somehow direct each name one at a time as the input to this command:gsettings list-recursivelyI've tried it with awk, and standard | piping and also as a string variable strvar=$(gsettings list-schemas) and using the $strvar as the input butam missing something in between I'm sure like for - while or proper syntax of awk etc

View 3 Replies View Related

General :: Use Output Of Previous Command As Parameter To Another Command?

Nov 13, 2010

I want to use the output of a previous command as a parameter to another command. For example: to know where "nice" is stored i typed: which nice output: /usr/bin/nice now the second command i typed is: ls -l /usr/bin/nice Is there a way to have a single command like: ls -l which nice ?

View 4 Replies View Related

CentOS 5 :: 'AT' Command Fails To Rm From PHP

Jun 18, 2009

I have tried every variation I can think of to get an 'at' to rm a file after a certain amount of time.

echo 'rm -f /var/www/media/images/tempProducts/XYZ.png' | at now + 2 minutes

In php:

$apCommand = "echo 'rm -f " . $sTempName . "' | at now + 2 minutes";
exec ($apCommand);

I have:

- pasted the command into the command line as root and it works fine so it seems to be rights related -- rm gets scheduled and the file gets deleted after 2 minutes

- tried every variation of sudo within the statement including making sure that apache is listed in sudoers

- chmod to 777

- chown to apache

The rm command does get scheduled into the 'at' queue but the rm never removes the file.

at -c (without adding sudo to the 'at' statement)
#!/bin/sh
# atrun uid=48 gid=48
# mail apache 0
umask 22

[Code]....

View 3 Replies View Related

General :: Use 'history' Command To Fire Last Run Command?

Oct 14, 2010

How do I use the "history" command to fire the last run command?

View 3 Replies View Related

General :: Write <Esc> In The Vim Command Line (:vim Command)?

Jun 24, 2011

how do you write the ASCII character #27 in the vim command line?

View 6 Replies View Related

Red Hat :: Net Time Set Command Fails With Success?

Jul 12, 2010

On Red Hat Enterprise Linux Server release 5.4, I enter the command:net time set -I 192.59.196.66Where 192.59.196.66 is the IP address of a Windows Server 2008 time serverThe response is:/bin/date 071218072010.20 failed. Error was (Success)The actual clock time does not get updated. However, evidently it did really communicate with the time server on 192.59.196.66, because the value in the response 071218072010.20 does correspond to the time on the time server, albeit in the somewhat bizarre format MMDDHHMMYYYY.SS.

View 1 Replies View Related

Networking :: FTP MLSD Command Fails In FileZilla

May 13, 2011

I have a problem with my filezilla (or my ftp server). When I want to connect to my ftp server (and also other ftp servers!), after MLSD command, I get a "Connection timed out" error.

Log:
Code:
Status: Resolving address of khanemashroote.ir
Status: Connecting to 46.4.196.109:21...
Status: Connection established, waiting for welcome message...
Response: 220 ProFTPD 1.3.4rc2 Server (Debian) [::ffff:46.4.196.109]
Command: USER badihi
Response: 331 Password required for badihi .....
Command: MLSD
Error: Connection timed out
Error: Failed to retrieve directory listing

View 1 Replies View Related

Fedora :: Library Access - Command Rpm -Uvh *.rpm This Fails Due To Many Dependencies

Nov 18, 2009

I installed FC 12, 64 bit yesterday. I downloaded open office and unpacked it. I then issued the command rpm -Uvh *.rpm this fails due to many dependencies Some of these are:

[Code]...

how to "link" or make these and presumably other libraries searchable.

View 1 Replies View Related

Ubuntu Servers :: (8.04) Apt-Get Install Squid Command Fails

Mar 8, 2010

Ubuntu Server 8.04. I have 2 servers in the same rack, on the same subnet, using the same DNS servers and build with the same media. On one of them the following command fails
Code:
apt-get install squid
On the other on the package was installed with out any problems. I have checked the /etc/apt/sources.list files and they are identical. Actually, it could not find mutt either.

View 5 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

Software :: At Command Fails \ Intention Is To Get Itself Executed Every Minute?

Mar 31, 2011

Here is my script for at command. The intention is to get itself executed every minute.

Code:
logfile=/tmp/attest.log
loginterval=1

[code]....

View 4 Replies View Related

Programming :: Python: Commands.getoutput (command) Fails

May 26, 2010

I've writte a small Munin plugin using python, which basically runs a shell command, and write the output to a file. For some reason the script fail quite often, and it seems to be failing at the "commands.getoutput" statement. This is what's leading up to that statement:

[Code]..

View 4 Replies View Related

General :: Merging Two Command In One Command?

Feb 18, 2010

I have a file and it has some content . Now I want to check for some text in that file and if does not exist I want to append it . So I need to first grep and then do "echo "content" >> s.txt" . Is there any way to execute this two commands in a single command .

View 3 Replies View Related







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