General :: Shell Script Doesn't Think A Directory Is Valid (but It Is)?

Apr 21, 2010

I've successfully built a library I'm using on Ubuntu Linux 8.04 (both x86 and x86-64) and now I'm building it on SuSE Linux 9.1 (x86-64). I set the environment variable required for the make script exactly as I set it on the other Linux computers. When I run the make script, I get an error citing that $DEVDIR, which is the root development directory, is not a valid directory. Here's the pertinent part of the script I'm running:

Code:
#!/bin/sh
if test "$DEVDIR" = "" ; then

[code]...

View 4 Replies


ADVERTISEMENT

General :: Data Recovery - No Valid Directory

Nov 15, 2010

I was trying to set up a partition on my netbook's hard drive, and foolishly forgot to backup my home folder. Now, Ubuntu (10.04, btw) won't boot. It allows me to get into the manual recovery shell, though. Now, I'm perfectly willing to reformat, but first I'm hoping I can recover the files from my home folder without having to take my netbook to the ridiculously overpriced computer repair centers in my area.

I have an external hard drive, but when it's plugged in during the recovery shell, it won't register as being a valid directory. I know the commands to copy or move a directory, but without my external reading as a valid directory to move my home folder to, I'm kinda stuck. Is there any other way to recover the contents of my home folder without having to go to a computer repair place? Neither of the ones in my area know much about linux at all, and I really don't want to have to pay $80+ to have someone else recover my home folder.

View 8 Replies View Related

Hardware :: Disk /dev/sdh Doesn't Contain A Valid Partition Table?

Nov 10, 2010

HDD name: Samsung Spinpoint F4EG HD204UI 2 TB (Internal HDD)My case doesn't allow more than 1 HDD, therefore I use a "USB 2.0 to SATA & IDE adapter".Next thing as usual with any HDDFormat and partition.HDD recognised just fine and listed when executing "fdisk -l":

Code:
WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util fdisk doesn't support GPT. Use GNU Parted.

[code]...

View 2 Replies View Related

Security :: Disk /dev/md0 Doesn't Contain A Valid Partition Table?

Nov 22, 2010

Disk /dev/md0 doesn't contain a valid partition table

View 1 Replies View Related

General :: Shell Script To Go To A Particular Directory?

Mar 2, 2011

shell script to go to a particular directory

View 5 Replies View Related

General :: Shell Scripting - For Each File In Directory

May 2, 2011

I am working on some homework, however i am not here to be spoon fed. I am trying to get the numerical modification date of each file in a folder. Ie lets say there is a file called bob and it was modified 2006-11-23. i want to get it into a variable as 20061123.

Now i currently have this code:

Code:

However for some reason my output is:

Quote:

See how the 2011 has been placed next to it? i ran it with -x and saw this:

Code:

However i do not know how to find a way around this?

View 11 Replies View Related

Server :: Block Connections To Apache If Client Doesn't Have Valid Request Headers?

Feb 8, 2011

My server gets ddos attacks. I dig into access logs and I saw that attacker ips doesn't have valid requests headers, like their browser application info or requested url info.I want to close those connections immediately, and if it's possible block those ips for a time period.Can I do that with Apache and iptables?I searched on the internet but couldn't find useful results. Probably couldn't search for the right words.

View 2 Replies View Related

Ubuntu :: Sudo Command Doesn't Work Anymore - No Valid Sudoers Sources Found

Jan 21, 2011

I was changing some file permissions with the chmod 777 command and i accidentally executed:

Code:

sudo chmod 777 /*/*/*/*

and now i can't get root access to anything. If I try executing a sudo command i get:

sudo: /etc/sudoers is mode 0777, should be 0440
sudo: no valid sudoers sources found, quitting

View 9 Replies View Related

General :: Shell Script - Use Variable In A For Loop With Directory Path?

Jan 19, 2011

I modified files in several directories, and need to run a diff on the backup I created before modifying the file.

I'm trying to compose a simple shell script to speed up the task, but getting a syntax error.

Here is what I have:

for i in DIR1 DIR2 DIR3 DIR4 DIR5 do;
diff /maindir/subdir/subdir/$i/filename.txt.old /maindir/subdir/subdir/$i/filename.txt;
done

I know the paths are valid, and if I run just the diff command with the actual DIR1 instead of $i it works.

View 2 Replies View Related

General :: Open A Second Shell Session That Will Remember The User, Machine, And Directory

Sep 21, 2010

I'm ssh'ed into a machine and logged in as a different user. Is it possible to open a few new windows that will still be ssh'ed into that same machine, still logged in as that user?

View 2 Replies View Related

General :: Shell Script Is Defined In Someother Directory - How It Is Being Invoked With Path

May 30, 2011

extract.ksh use this scripts topic_file_publish.sh but extract.ksh resides in /data/apps/pnbos/scripts

but topic_file_publish.sh in below directory/data/apps/pnbgstk/publication >

ls topic_file_publish.sh topic_file_publish.sh fraespappp8:/data/apps > type topic_file_publish.sh topic_file_publish.sh is hashed (/data/apps/pnbgstk/publication/topic_file_publish.sh)

How it is done?

since topic_file_publish.sh is being directly referenced in the code with absolute path.

View 2 Replies View Related

General :: Write A Shell Script Which Will Read The Directory Path As Input From User?

Nov 28, 2010

I am new to writing shell scripts. So, please bare with me. I am currently trying to write a shell script which will read the directory path as input from user and will traverse the Dir tree to find all available audio and video files. I have tried to write as much as I could but I don't know where I am making mistake as I get some files to be audio file which are actully tar balls. On the second note there are some files which video but script shows them to be audio. And, some video files are completely skipped. I am giving the shell script below so that you can see. I am using two external files as source which I am attaching.

Code:

#!/bin/bash
#Let's load the extensions that we want to search for
vdExt=$(cat vdExtList)
adExt=$(cat adExtList)

[code]....

View 5 Replies View Related

Ubuntu :: There Was An Error Installing The Selected File, Index.theme Doesn't Appear To Be A Valid Theme

Mar 31, 2011

I backed up .themes from /home, but on trying to install them (files don't show as theme packages) it says "There was an error installing the selected file, index.theme doesn't appear to be a valid theme". Did I backup the right thing?

View 1 Replies View Related

Software :: Password Command Doesn't Recognize Valid Password

Nov 23, 2010

I migrated an old SuseLinux 10 box to Debian (Lenny) a couple months ago, and apparently no one noticed you can't change your password. Root can do it because passwd doesn't ask root for a password, but no one else can (although they can log in, passwd doesn't recognize their login password when they attempt to set a new password and it asks).I changed authentication to use blowfish when I setup the server (because the SuseLinux 10 system used it) and apparently the passwd command doesn't work with that. Apparently I need to update another configuration file or possibly get a different program to update the passwd file if I use blowfish. Any ideas?

The weird thing is that it can generate a blowfish hash to set a new password, but apparently can't generate one to authenticate the user.something changed recently and it is no longer generating a blowfish hash when setting a new password. It is generating a hash with only 13 characters. And I can clearly see that many users have changed their passwords.

View 1 Replies View Related

General :: Vsftp Doesn't Do Initial Directory Listing?

Aug 4, 2010

I have a user who just got a new laptop and when he connects to the FTP server, it verifies his username and password like it should, but when it goes to do the directory listing, it just kinda sits there. if i refresh the view, the folders show up. wonder if there's something in a log somewhere for vsftp i should be looking at. it could just be his ftp client or air card too, but i want to be thorough on the server too becuase it will help me learn.

View 2 Replies View Related

Ubuntu :: Directory Exists But Bash Says It Doesn't - No Such File Or Directory

Aug 19, 2011

I've run into a problem with my bash program.

Code:a mkdir -p /home/chris/Downloads/ARCHIVE/`date -I` find /home/chris/Downloads* -mtime +14 -exec "cp {} /home/chris/Downloads/ARCHIVE/`date -I` ;

It's meant to move old files from my Downloads folder into an archive file (later tar them). The directory exists, I've used $PWD and nautilus and ls to make sure it's there, yet for every file it gives

Code: find: `cp /home/chris/Download/foo.bar /home/chris/Downloads/ARCHIVE/2011-08-19': No such file or directory I tried to test it on a different destination, specifically my home folder. IT still gave me the error.IS it a bad syntax within find or something else? I'm running a 32-bit system with 11.04

View 4 Replies View Related

General :: Logging In Non-root Users Fails Either With "no Shell" Or No Directory

Mar 9, 2010

I tried to create a user on Solaris 10 but when I try to login the user with "su -" I get the error message "no directory". When I try to login with "su" I get the error message "no shell".

I tried the useradd several combinations e.g.

All the tries i made didn't work. I also checked the permissions on /etc, /bin, /sbin and / and it seems ok so that the newly created user can access them.

View 14 Replies View Related

General :: Installing A Library Locally In Home Directory But Program Doesn't Recognize It

Aug 18, 2011

I am installing a program on a server as a non-root user. Specifically it is tmux 1.5, but this should apply broadly to all locally installed program in my opinion (I mention the program name in case this problem ends up not being my own error).

The program requires me to install some dependent libraries (e.g. libevent and ncurses). So, I installed them both locally since I do not have root access

cd $HOME/library/installation/folder
DIR=$HOME/local
./configure --prefix=$DIR
#... make ... make install

[Code]....

Ok, so this installs the program without problems into $HOME/local/bin, but if I run the executable: $HOME/local/bin/tmux , I get the following error:

tmux: error while loading shared libraries: libevent-2.0.so.5: cannot open shared object file: No such file or directory

It would seem to me that the program cannot find the desired libraries, but the file libevent-2.0.so.5 does indeed exist in $HOME/local/lib as specified in the configure options. I am wondering how I can get the program to recognize the installed library in order to run. I tried putting symbolic links in $HOME/lib, $HOME/bin, and $HOME/local/bin, but none of these worked.

View 2 Replies View Related

General :: Login As Other User Using Shell Doesn't Load The Profile For That User?

Dec 11, 2009

I am using the sudo command to log on locally as another user by the following command:

sudo -u theotheruser -s
or
sudo -u theotheruser sh

As I see it, this initiates a new shell with the mentioned other user.However, this doesn't load that users profile from his home directory.Is there a way to automatically read the users profile when login in with selected command? I am mostely interested in getting a working prompt when logged in.

View 11 Replies View Related

General :: Cannot Browse Valid URL

Jul 18, 2011

My centos 5.6 firewall server shares its Internet connection with my windows machine behind it. After the required settings, the windows machine can ping valid ip addresses but it cannot browse valid url (despite the fact that DNS is set for it).

View 14 Replies View Related

General :: No Valid Partition Xen Server?

Dec 29, 2010

Attempting to move from Xen to VMware, have dd old xen disk to image file and loaded in vmware. The disk is visible when running from a knoppix rescue disk however it can only be mounted as /dev/sda

On the Xen vm fdisk -l shows /dev/sda as:
Disk /dev/sda1 doesn't contain a valid partition table

This also reflects in the DD image. I'm assuming this is because it was part of a volume group ?? on the Xen Server. As it is mounted as /dev/sda on the knoppix rescue cd I can't run grub or seem to mount it as /dev/sda1 after recreating the partition in fdisk. How can I reinstall grub on this and get it to boot ?

View 1 Replies View Related

General :: Can't Find A Valid Ram Image

Apr 8, 2010

I've compiled the kernel 2.6.33, configured it and installed (make install)

When it boots up I get the following messages: RAMDISK: I can't find a valid disk image at 0 VFS: Couldn't open root at /boot/vmlinuz-2.6.33mykerne1 or block (0,0)

Code:
My current system configuration is:
Linux domenico-laptop 2.6.24-16-generic
/etc/boot/menu.lst
titleUbuntu 8.04, kernel 2.6.24-16-generic

[Code]....

View 4 Replies View Related

General :: /dev/sdd1 Is Not A Valid Block Device?

Jun 14, 2010

When I try to mount the /dev/sdd1 device then it give errormount -t ext3 /dev/sdd1 /4hdmount:/dev/sdd1 is not a valid block device

View 9 Replies View Related

General :: Errors Executing Shell Script: "command Not Found" And "no Such File Or Directory"

Jan 14, 2011

A colleague gave me a shell script ("dti_motion") which needs to be run from the directory containing all the files it works on. I want to run the same script for several different directories. But I don't want to have to cd into each directory, run the script, wait for it to finish, and then cd to the next directory (there are 52 to do altogether).

So I wanted to write a very simple script that will cd to each directory and perform the script there, before going on to the next one. My colleague's script ("dti_motion") is stored in my home/bin/ and is executable. My home/bin/ is in my path, as verified by echo $path. When run from a directory containing the necessary information, the dti_motion script works perfectly well. I wrote an extremely inelegant script called "dti_motion_do_all" which is also stored in my home/bin/ and executable:

#!/bin/sh
#Get motion information for each subject, using Mark's script, called dti_motion
cd /imaging/cr01/PD_DTI/C_10/12x5

[code]....

I know there will be more elegant ways to write this script with loops, rather than simply using cd, but for the moment, I just want this to run, until I have learnt to use loops properly. how to correct either of those "command not found" or "no such file or directory" errors, given that both the original dti_motion and my dti_motion_do_all script are in my /home/bin/ (which is on my path) and both scripts are executable?

View 1 Replies View Related

General :: Counting Valid Paragraphs From A Html File?

Mar 28, 2010

I just wrote an html file, but somewhere on the write I lost count of the paragraphs.

In an html file paragaphs starts with <p> and ends with </p>

What I want to know is how to find the valid paragraph.

I used grep '<p>' file_name | grep -wc '</p>' . I dont know if this works.

View 7 Replies View Related

General :: MPC Make Error Libgmp.la Is Not A Valid Libtool

May 26, 2011

I am trying to make mpc .

I first configured using following

Code:

then i make using

Code:

View 2 Replies View Related

Ubuntu :: Shell - Run Command For Subset Of Files In Directory?

Jan 28, 2011

I cannot find the way to run some command for a subset of files in directory - how can I do it

View 3 Replies View Related

Programming :: Check If Directory Exists Using Shell Script

Apr 20, 2009

I am trying to write some small script file that will check if a USB stick is connected to my pc or not. I can't seem to get it to work, but I am sure it is a very simple fix.

I am running on Fedora core 10.Can anyone help me figure out what the problem is?If I run these lines through console it works fine (meaning, I type the commands in this file straight in the command line/console).

View 9 Replies View Related

Programming :: Shell Script Searching File In A Directory?

Feb 23, 2011

I am trying to search particular directory which has files with extensions like .html,.mp3,.xml etc I have a list of such files What I am doing in my script is

for file_name in `find /home/ -name index.html -o -name song.mp3 -o -name help.xml`;
do
if [ $file!='' ]
then

[code]....

I have around 100+ files name with some particular extension , this code works fine if the directory name does not have any special character in it like " "(white character) .

It is failing to give the output. IF I run the find command on the console the I am getting the correct file name with location

/home/user1/public_html/mediawiki/config/movie.mp3
/home/user1/public_html/mediawiki/movie.mp3
/home/user1/public_html/mediawiki/pop.mp3
/home/user2/public_html/index test/pop.mp3
/home/user2/public_html/index test/web.xml
/home/user2/public_html/song.mp3

If I echo the file name from the script Then output is little missed match when a directory name has special char like " "

/home/user1/public_html/mediawiki/config/movie.mp3
/home/user1/public_html/mediawiki/movie.mp3
/home/user1/public_html/mediawiki/pop.mp3

[code]....

I am not sure what is wrong with script or my code .. Does shell have un-controlled behavior of manipulating the output of any command.

View 14 Replies View Related

General :: $HOME/.bashrc Disabled When User Shell Is 'rbash' (restricted Shell)?

Jun 15, 2011

MACHINE: HP Proliant DL260G5OS: SLES 11 SP1kernel: Linux xserver 2.6.32.12-0.7-default #1 SMP 2010-05-20 11:14:20 +0200 x86_64 x86_64 x86_64 GNU/LinuxIt is used as remote xserver in a LAN.I have configured /usr/lib/restricted/bin/.rbashrc with some environment variables but when the users logon in the system finally is executed $HOME/.bashrc and some environment vars are overwritten.

View 2 Replies View Related







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