General :: Whenever Execute The Below Scriptlet With Out Proper File Name It Deletes /tmp Directory?
Jul 22, 2010
Whenever execute the below scriptlet with out proper file name it deletes /tmp directory .I guess this is because value of variable a didnt get initialized and there for rm -rf /tmp/ get executed and entire /tmp directory get deleted.How would i avoid any empty variables to be used in script? as this is a classic case of destructive script.
Code:
#!/bin/bash
echo "Enter file to delete from tmp"
I was doing a tutorial on scripting in bash. I saved my file on the desktop and I cannot seem to get to that file to execute it. Here is what I have been using:
I try cd Desktop says that there is no such directory.
Is there a way under linux to find out directory with frequent writes and/or deletes?
I'm using Ubuntu and recently bought SSD. I moved /tmp to ramdisk and did some other tweaks to avoid wear. But I was wondering if there's a way to pinpoint hotspots in filesystem where files are often written. For example webserver's log directory with many appends every minute or user's download directory where he downloads gigabytes of stuff only to be moved elsewhere soon after finishing.
I came across inotify which could probably do the trick but it seems it'd require lot of scripting which I'm not very familiar with
I'm using rpmbuild 4.8.0 to build my rpm package on RHEL6. The spec file works just fine with any other Linux Releases, including RHEL5. But at the end, build failed with: "shell-init error retrieving current directory: getcwd: cannot access parent directories: No such file or directory" I found that rpmbuild tried to compare the BUILD directory with the root filesystem, it will delete the BUILD directory if it's not '/'. My working directory is /tmp/test, so something like this in the /var/tmp/rpm-tmp file:
I just installed Maya 2009 on Fedora 13.It seemed to run the RPM install fine, but when I go to Applications > Graphics > MayaI an error:Could not launch 'Autodesk Maya 2009 (64-bit) Failed to execute child process "/usr/autodesk/aya/bin/maya"(no such file or directory)I browsed to this location in the file browser and there definately is a file called maya in "bin"
There seems to be a common solution to get the webcam working with Skype - rather than launching with Skype you launch with LD_PRELOAD=/usr/lib32/libv4l/v4l2convert.so skype - so far so good. When I do this I get the error There was an error launching the application. Details: Failed to execute child process "LD_PRELOAD=/usr/lib32/libv4l/v4l2convert.so" (No such file or directory). But I do have that directory and file on my system.
A ubuntu community doc talks about the terminal command sudo ld.so.preload-manager when I action this I get sudo ld.so.preload-manager /usr/lib/libv4l/v4l1compat.so [sudo] password for dad: sudo: ld.so.preload-manager: command not found
So I am trying to install Plastic 2.8.148.0 on a virtual server. I have the install package that i copied over to the machine using WinSCP i then gave the file executable permissions by using the command "chmod +x PlasticSCM-professional-2.8.148.0-linux-installer.bin" But when i try to install the package by using the command "sudo ./PlasticSCM-professional-2.8.148.0-linux-installer.bin" It gives me the following message.
sudo: unable to execute ./PlasticSCM-professional-2.8.148.0-linux-installer.bin - No such file or directory
why it isn't recognizing it? I know the file was there because i was able to change permissions and i can see it with -ls command.
I am using Ubuntu 10.04 LTS. Two days ago I updated using update manager. After that I can not boot Ubuntu. When I trying to boot system showing message " Ubuntu is running in low-graphics mode Your screen, graphics card and input device settings could not be detected correctly. You will need to configure these yourself" But I can not configure it.I can not boot to 'recovery mode' also
/var/log/boot.log
Code:
fsck from util-linux-ng 2.17.2 /dev/sda6: clean, 304282/1680960 files, 2964945/6723194 blocks init: Failed to spawn ufw pre-start process: unable to execute: No such file or directory
I just updated from 9.04 to 9.10 (it's a long story, and I still can't go beyond 2.30).The update got rid of WICD, which is what I used and installed network-manager. Network-manager was not working at all, so I uninstalled it again and installed WICD. I could connect perfectly and had no problems.However, now the computer hangs during boot, saying that init can't start network-manager. I assume that something went wrong during the uninstalling process, since it wasn't updated.
This is the message: init: Failed to spawn network-manager main process: unable to execute: No such file or directory.
So how do I update it or manually change it so it stops requesting network-manager?
My machine is dual booted with Fedora 14 and RHEL 6. (I have only installed Red Hat because I am studying for RHCE). Just now I tried to install the Banshee player on my Red Hat OS. I ran various scripts inside the directory to see what really happens and after I ran the 'Makefile.in' file my terminal froze. It displayed '/bin/ not found'Then i restarted my computer and I got the following messages:
init: Failed to spawn readahead-collector main process: unable to execute: no such file or directory init: Failed to spawn rcS main process: unable to execute: No such file or directory init: Failed to spawn readahead main process: unable to execute: No such file or directory
[code].....
I tried run level 1 and run level 3 but I get the same error messages.
I was always confused about the way it says that the execute permission for a directory means "able to list it". I just don't get it.Does no exec permission mean "still able to read files from in the directory, but not able to find out what files it contains" or what?
But these binaries (a,b,..etc) are in a different sub directory from where the above file is located. How do I write a script that will pick up each line from the file and execute it.
I am setting up a file server using Ubuntu and want to make sure I set up a folder structure that will last. Where should I be placing everything that I am sharing (Music, Pictures, Videos, etc)? In theory, if I was setting this up on Windows, I would create a folder directly under C: and set up the different areas of sharing under that (not that that approach would be best either).
Based on constructive criticism, the question is rather ambiguous. My question could be restated to ask "Where shouldn't I set this up? Would /usr be an appropriate place to start? Or would /opt be better?
I was wondering what is the difference between directory execute and read permission?Also, how do I recursively remove executable permission from a dir, but just apply it to normal files?
Relatively new to Linux, but I'm trying to grasp the proper way to modify the sudoers file. As an example, what would I have to modify in /etc/sudoers to allow a user (say 'user1' for the example) to be able to add/remove software through yum? I'm aware of the fact that I need to use visudo and how to use the vi editor. I've Googled this topic and while I've found a number of pages on the topic, I never see many examples.
Code:RW-00022: Error: - Unable to create file with proper privileges: JAVA_TOP Mount Point = /media/SAMSUNG/d01/oracle/vis/apps/apps_st/comn/java/classes test using command: su applmgr -c "touch /media/SAMSUNG/d01/oracle/vis/apps/tech_st/10.1.3/appsutil/jdk/test.tst" touch: cannot touch `/media/SAMSUNG/d01/oracle/vis/apps/tech_st/10.1.3/appsutil/jdk/test.tst': Permission denied
I am trying to install Oracle ebs on my machine and I keep getting the above error.
it compares two files using md5... if they are same , a corresponding character is output to a text file .. but the problem is it gets appended by default.. is there any way to output in a normal way because the text is a message and it should be of proper format here is my script
Code:
#!/bin/bash g=`tail -1 new.txt|head -n 1` array=( a b c d e f g h i j k l m n o p q r s t u v w x y z ) for((i=1 ; i <$g+1 ; i++))
[code]....
the message is supposed to be hello , i need to get rid of the endlines somehow..
Failed to execute child process "gnome-help" (No such file or directory)I get this error when clicking on the Help button in, for example, the preferences dialog box like for the Time and Date panel.I cannot find anything in the Synaptic Pkg. Mgr. or Ubuntu Software Center that indicates "gnome-help".
I've installed MatLab in my Acer Aspire one netbook which runs karmic. Does anyone know what can cause this error message from appearing when i click on the icon? Could not launch 'MATLAB R2009a' Failed to execute child process "matlab" (No such file or directory)
So I am trying to put together a simple command that when executed from the project folder will run the appropriate hg/svn command in each project i.e:
[Code]...
Since the client has many such projects, Instead I am looking for a solution similar to find -exec where the svn/hg commands are automatically executed on each first level of match (i.e. svn up is run in the project/a folder but not in project/a/subfolder). How can such a command be constructed ?.
When I press )print screen button ) it says ....here was an error running gnome-screenshot:Failed to execute child process "gnome-screenshot" (No such file or directory)
i created a /tmp partition amd mounted it like this:" mount -o loop,noexec,nosuid,rw /usr/tmpDSK /tmp" I know i can't execute things in /tmp now but is there a way to execute only one file and no more???
Downloading Virtual box, I saw a link with title All distributions on its home page:
VirtualBox-3.2.8-64453-Linux_x86.run
I have not downloaded it yet, I wanted to know how to execute it ? I've never seen a .run file before ! Does this mean this file is supposed to run on all distributions ?
I want a quick and simple way to execute a command whenever a file changes. I want something very simple, something I will leave running on a terminal and close it whenever I'm finished working with that file. Currently, I'm using this: while read; do ./myfile.py ; done And then I need to go to that terminal and press Enter, whenever I save that file on my editor. What I want is something like this: while sleep_until_file_has_changed myfile.py ; do ./myfile.py ; done
Or any other solution as easy as that. BTW: I'm using Vim, and I know I can add an autocommand to run something on BufWrite, but this is not the kind of solution I want now. Update: I want something simple, discardable if possible. What's more, I want something to run in a terminal because I want to see the program output (I want to see error messages).