General :: Linking Init Script To Specific Rc0.d, Rc1.d Etc Directories?

Aug 20, 2010

I have written an init script which I have kept under /etc/init.d, I need to create links to the directories rc0.d, rc1.d, rc2.d, rc3.d etc.. So that I can use chkconfig command to control the starting and stopping of the script at specific runlevels.

View 4 Replies


ADVERTISEMENT

General :: Bash - Mirroring Of Multiple Directories - Hard Linking

Apr 11, 2011

I have 5 FTP users that upload files (and subdirectories) in their home directory, i need to mirror theese directories beetween them and with a "master" directory (accessible from a 6th user). Files can contain spaces or others special caracters. All the files are in the same filesystem, and i want to use hard link because i don't want to waste 5 time the space of a single file. I tried with find but i cannot handle spaces in it.

View 1 Replies View Related

General :: Specific File Name Renaming In All Sub Directories?

Apr 4, 2011

I have a dir (pub_html) with 45 sub dirsand in each there is a file with name file123.html) what command can I use to rename all files with this name in all sub dirs to file456.html ? I'm on opensuse 11.3

View 14 Replies View Related

General :: Recursive Delete Specific Files From Sub-directories?

Mar 4, 2011

I would like to be able to recursively delete specific various files from a directory and sub-directories. For example:

Dir/
|_sub1/
|
|_ _rm *file1 *file2 *file3

[code]....

View 11 Replies View Related

General :: List Files In Specific Directories Older Than 1 Day Or 24 Hours

Apr 7, 2011

I am trying to write a simple back up script in python where I try to list the files that are 24 hours old in specific directories that I would choose.I read the manual of find and used

find . -mtime 1 > log.dat

to get the list of files in the log.dat however I also get the path information in that list as such

./hpc06MatlabCodes/2011/Apr/3dBoxModel
./hpc06MatlabCodes/2011/Apr/3dBoxModel/vfluidIrca10.dat
./hpc06MatlabCodes/2011/Apr/3dBoxModel/vLRecoveredSystem.mat

is there a way to exclude the directories and only get the files list.

View 2 Replies View Related

General :: Command To Find A Specific Word In Directories And Subdirectories?

Jun 7, 2010

tell me the command used to find a specific word in directories and sub-directories in linux?

View 4 Replies View Related

General :: Command For Listing Files/dirs Recursively Of Specific Directories?

Jul 22, 2011

suppose in my current directory, I have 50 sub-directories. Now, I am interested only in about 20 of those sub-directories (whose names match a pattern). I would like to recursively list the contents of these 20 sub-directories. How do I do that ? I would like to do this in Solaris 10 and Linux(RHEL 5.x).

View 3 Replies View Related

General :: Assign Read Privileges To User On Specific Directories And Files

Jan 26, 2011

I am using CentOS 5.5 and I created few users (useradd john etc.) and now I want to assign privileges to this user on some directories and files in those directories. For example I want to give read privileges to directory "/documents" and all of files under that directory.

View 13 Replies View Related

Programming :: Static Linking Versus Dynamic Linking

Apr 18, 2010

I have written an OpenGL based program which uses i.a. libjpeg that I want to link statically so I can send it to someone who doesn't have all the libraries needed installed to allow for a dynamically linked executable to run. As such I tried with giving the [b]-static[b] parameter to gcc.

Code:

x86_1$ make
gcc -O3 -c jpegloader.c
gcc --std=c99 -O3 -c --std=c99 -I/usr/include -L/usr/X11R6/lib main.c

[code].....

Why would gcc claim that I'm missing GLUT? This works perfectly fine when I do dynamic linking -- i.e. omitting the -static argument.

View 13 Replies View Related

Software :: Using Find To Only Search Specific Directories?

Jan 9, 2010

how the "-prune" option works. I've searched quite a bit on line, and as far as I can tell, "-prune" works exactly the opposite as it says.

I'm using Apt-proxy, and I want to scan through the folders, and find files that end with "*.bz2" The problem is that the search takes a while because of all the "*.deb" files. Fortunately, they're stored in their own folder:

/var/cache/apt-proxy/ubuntu
/var/cache/apt-proxy/ubuntu-security
/var/cache/apt-proxy/partner
each have two folders:

[Code]....

View 5 Replies View Related

Red Hat / Fedora :: Script Will Create Directories For A Specific Datatype?

May 24, 2010

1. This script will create directories for a specific datatype. Example rickk, rik, rikky etc.2. This script will aslo create subdirectories labeled by the duration of an event.For example if an event where to take place for 5 days, May 5 - 10th. Folders will be labled:20100505, 20100506, 20100507, etc will be included in each datatype.Since this exercise will take 6 days there will be 6 subdirectories under each datatype.3. This script will also create cgi scripts for each of the dataype and day of the the exercise.For example dataype "rik" for May 09 will read rik5.cgi, since May 09 is the 5th day of the exercise.This is how it looks so far, it works great but I realized that if and when I plan to add more datatypes that its going to involve alot of repetivie typing. I figure to simplify this whole thing would be best to use loops. Can someone direct me to some good information concerning loops and sample of loops? I have a feeling that what I need to do is going to involve a nest of loops.

#!/bin/ksh
root_dir=/opt/global/webservices/apache/app/test/dynamic/
cd $root_dir

[code]....

View 1 Replies View Related

Software :: Create Certain Files And Directories With Specific Owners On The Target Machine

Jun 29, 2010

I'd like to create a tar file on my machine to distribute software to other machines which are all alike (including, usernames, groupnames, etc). I need to create certain files and directories with specific owners on the target machine. In order to do that, I use

Code:
tar --create --owner=someone --group=somegroup --file package.tar files. However, for this to work, someone must be in my /etc/passwd and somegroup must be in my /etc/group. Is there a way to fake this so I don't have to create a bunch of users only for that purpose?

View 3 Replies View Related

Ubuntu Servers :: Change The Ownership Of Multiple Files And Directories Under A Specific Subdirectory?

Feb 19, 2010

I have a vary unique problem with file and directory ownership. I need to change the ownership of multiple files and directories under a specific subdirectory.Under this directory structure there are files and directories owned my different users and groups. I need to change all files and directories owned by "user1" to "user2". but if any are owned by "user3" I need those left alone.Is there a simple way to do this or will I need to traverse the structure and change things one at a time.

View 3 Replies View Related

General :: Create A Backup Directory And 3 Directories Within That And Some Files Within The 3 Directories And Then Back Them Up Ot Restore Them?

Dec 19, 2009

i am in need of linux help. iam at college and i need this back/restore script to pass this final part of an assessment. i require a backup script that will not only backup but also restore files to the relevent directories. e.g. users are instructed to store all wordprocessor files in a directory named wp. so i am needing to create a backup directory and 3 directories within that and some files within the 3 directories and then back them up ot restore them. l know i should/have to do this myself by been trying to get/understand info for the last few days and came up with zero.

View 14 Replies View Related

General :: Multiple Users To Create Directories Over SFTP So The New Directories Keep The Same Permissions?

May 15, 2011

I want to make a webserver with multiple users allowed to login through SFTP to a specific folder, www.Multiple users are added, lets say user1 and user2, and all of them belonging to the www-data group. The www directory has an owner www-data and a group www-data.

I have used chmod -R 775 on the www folder, but after I try to create a folder test through my SFTP server (using Filezilla) the group of the directory created has only r and x permissions, and I am not able to log in with the second user user2 and create a directory within www/test due to a lack of w permission to the group.

I also tried using chmod 2775 on www directory, but without luck. Can somebody explain to me, how can I make it so that a newly created directory inherits the root directory group permissions?

View 2 Replies View Related

General :: Kernel Panic - Not Syncing - No Init Found - Try Passing Init - Option To Kernel

Apr 19, 2011

Im am building a Linux distro. It will be very tiny and fast.

I only have a minimal linuxkernel (bzImage) who is 1,2 mb big. And then I have Busybox who is 174,6 kb big.

The commands in busybox is: cd, ls, mkdir, rmdir, wget, httpd, clear, rm, poweroff, halt, reboot, fdisk, mount, umount, free, and cp.

When I compiled the kernel i use initramfs/initrd function and point it to a folder where initrd/initramfs source is.

The kernel works OK with others initramfs/initrd files. But not with my own.

Quote:

Here is how the end of the kernelcomplie look like.

Quote:

Here is my init file who is the initrd/initramfs source.

Quote:

The initramfs folder contains "bin" (folder) and "init" a file. No more.

The problem is that the kernel cannot find/read init file.

View 4 Replies View Related

General :: How To Store Files / Directories In Different Different Directories?

Mar 23, 2011

I am writing a script, in that my requirement is, if all the fill types stored in one directory from that we need to separate different different directories based on the file types.

for example in a directory(anish). 5 different types files
1- directory
2- .txt files
2- .sh files

like that and my requirement is the (1- directory is moved to one new directory(dir) which we are given in the script)and (2 .txt files are moved to another new directory(test) which we are given in the script)and ( 2 .sh files are moved to another new directory(bash) which we are given in the scrip)finally the directory anish should be empty..using bash script.how it is possible !!

View 7 Replies View Related

General :: Change A Specific Characters To Capital In A Specific Text?

Dec 2, 2010

for example

else {
for fileDOC in $location/*.doc
do

[code]...

View 12 Replies View Related

General :: Linking GPL Apps To Non-GPL Libraries

Jan 20, 2010

I have a library that I have ported from Windows, and is not a derivative work of Linux. The library is subject to copyright law, and I can't disclose the source. I would like to link a GPL application to this library, and want to know if the linking would cause the library to be GPL. If the library becomes GPL, is there some other way (kernel loadable module?) that I can keep my library from becoming a work of GPL?

View 2 Replies View Related

Ubuntu :: Computer Seemed To Be Frozen - Reboot - No Init Found. Try Passing Init - Bootarg"

Jan 1, 2011

I've been dual booting 10.10 with Windows7 for about a month. Today is the first time I've encountered a serious problem.

This morning, nothing functioned properly after trying to open several programs. The computer seemed to be "frozen", although the mouse was working fine.

I decided to reboot, but then encountered an even bigger problem.

It failed to boot and got this message: no init found. try passing init= bootarg

The problem now is that it requires a Live CD session and I keep getting this: GLib-WARNING **: getpwuid_r(): failed due to unknown user id (0)

In case it matters, I didn't install 10.10 from an ISO, I just upgraded from 10.04.

View 2 Replies View Related

General :: Ubuntu 10.04 - Linking To Lua Libraries With Codeblocks

Jun 18, 2010

After I downloaded the source for lua, I followed the install instructions, doing...

make linux install
make generic install

I've also done the make test and it passes, printing out Hello World, from Lua 5.1. However, I can't link to the lua libraries in CodeBlocks. I know where lualib.a is (usr/local/lib) which I set in my Search Directories for the linker. I still get error messages like...

undefined reference to lua_isstring

P.S. I had this running on Windows via Visual Studio.

View 1 Replies View Related

General :: Undefined References And Linking In WordNet

Jan 19, 2011

I'm writing a C program using WordNet, just a very basic one to test out if everything was working fine, but I'm getting undefined references. I linked to the library and compile with

Code:
gcc prog.c -L/usr/local/WordNet-3.0/lib/libWN.a -I/usr/local/WordNet-3.0/include/
This seems to be the only wordnet library to link to, but I'm still getting the error

Code:
/tmp/cc4C3I3S.o: In function 'main':
prog.c:(.text+0x21): undefined reference to 'is_defined'
prog.c:(.text+0x48): undefined reference to 'findtheinfo'
collect2: ld returned 1 exit status

I feel it must be an error with the way I'm going about trying to link the files.

View 4 Replies View Related

Ubuntu :: Error - No Init Found - Try Passing Init=bootarg

Jan 20, 2010

Ubuntu 9.10 will not boot! System froze this morning, I restarted and it is now failing to boot. Starts loading grub and I get this message:

mount: mounting /dev/disk/by-uuid/04aa3697-7bc0-45b5-b86a-77a1e6534bd5 on /root failed: invalid argument
mount: mounting /sys on /root/sys failed: no such file or directory
mount: mounting /dev on /root/sys failed: no such file or directory

[code]....

I booted with 9.04 LiveCD discovered the drive could not be mounted-ran fsck -ln and it told me the drive has no valid partition table. I have had intermittent problems mounting flash drives before this, so I'm kind of worried it might be a hardware issue.Also have files on that drive I would rather not lose, so reinstalling is hopefully a last resort.

View 9 Replies View Related

General :: Chroot Not Supporting Dynamic Linking Objects?

Jul 8, 2011

Why can't chroot command be used for dynamically linking objects?

View 1 Replies View Related

General :: Linking Ubuntu To Windows 7 Computer - Both Are Laptops

May 12, 2011

can i link my linux (dedicated) to my windows 7 computer - b0th are laptops.

View 3 Replies View Related

General :: Static Versus Shared Libraries (Linking C Program With GCC)

Mar 16, 2010

I have a third party static library (libSTATIC.a) that I cannot recompile into a shared library. I want to create a shared library (libSHARED.so) that uses the C functions in the static library. Is it possible to do this? In other words, when linking a C program with gcc by using the -shared flag, is it necessary that all all libraries invoked in the program (even low level libraries such as libc for example) be available as shared libraries as well?

View 2 Replies View Related

Server :: Diffrence /etc/init.d And /etc/init.d/rc.d Scripts?

Jul 29, 2010

me the difference between /etc/init.d scripts and /etc/init.d/rc?.d scripts.

View 3 Replies View Related

General :: Run A Program For A Specific Amount Of Time Starting At A Specific Time?

May 18, 2010

I want to record an internet radio station starting at 2:00am tomorrow morning. The specific program on the radio station lasts until 6:00am. The command I need to run to record the station is: Code:mplayer http://wjcu.jcu.edu:8001/listen.pls -ao pcm:file=indie_heat_of_the_night.wav -vc dummy -vo nullI'd use cron, but 1. I'm not sure how to and 2. it seems unnecessarily complicated for something that I only want to run once. If cron is the only/easiest solution, I guess I'll just have to resort to that, but I'd rather not.

View 12 Replies View Related

Programming :: Init Scripts In /etc/init.d?

Sep 17, 2010

I have written an init script and placed it in /etc/init.d/ directory.What I would like to know is, will the script run automatically or we need to install the script using "install_initd" command.If I have to invoke this command manullay, what will be the best place to do this ? Can I add this to "/etc/init.d/rcS" file

View 6 Replies View Related

Debian :: INIT : Cannot Execute /etc/init.d/rc?

May 7, 2011

I'm trying to boot Emdebian lenny on my compact flash and it shows the following errors during boot time :

Code:
Mounting local filesystems ... done .
/etc/rc.d/S35mountall.sh : line 45 : uname : command not found .

[code]...

View 3 Replies View Related







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