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


ADVERTISEMENT

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

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

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

Programming :: Spec Files To Create RPM Packages For The Target System?

Jun 10, 2010

I'm trying to debug a program that I crosscompiled on a arm9. The crosscompiler uses . spec files to create RPM packages for the target system. The program compiles and runs correctly except when i run the program with gdb and then type list I get this message: Code: 1 main.c: No such file or directory. in main.c I made sure I compiled the program with CFLAGS=-g by putting this in the .spec file. when the application crosscompiles (I believe) it shows it compiled succesfully with the -g flags: Code: checking whether gcc accepts -g... (cached) yes

[Code]...

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

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 :: If Some Users Modify/delete/create Files/directories?

Oct 25, 2010

i've been wondering how do i know if some users create/modify/delete file/directory in linux, i've been using pyinotify in python script.this script like the example from the manual:

Code:
#!/usr/bin/python
import pyinotify, os, time

[code]...

View 10 Replies View Related

General :: Create Files For Specific Output?

Mar 10, 2011

I would like to create a bash script that takes the following text and split in different files. The output is:

Code:
JOB ID: 1
JOB NAME: Test1
01012010 Message: Success1
01012010 Message: Success2

[Code]....

View 7 Replies View Related

Server :: Create A File From Two Files With Specific Search Conditions?

May 5, 2010

I need to create a report ,

The data is spread across two files in below format,

File 1
=========
<Class Name1>
Ph: 001
Place: place001
</class>

[Code]....

View 4 Replies View Related

General :: Restoring The Owners On Debian System Files?

Mar 20, 2010

Due to my inattention, tiredness (and probably stupidity) i've run "chown -R someuser:someuser /" and now all your base are belongs to us the files on the server belong to one user (lol).After system restart, apache, bind9, mysql, and adozen other applications don't start and fill their log files with permission errors.I haven't done any backups on system files, only on the db and website files.Please suggest some ways to revive my web server. I have only 2 month experience with linux,

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

Networking :: Route Only For A Specific Port And Target?

Mar 14, 2011

I have to route some packages over the right interface.I default route everything for the target-network over one network-interface. That works perfectly. But i have to route packages for one specific host and one specific port over another network-interface. I tried many things with the route-command, but i think there's no possibility to route only one port? May i can do this with iptables? I only found ways to forward some packages, which are coming in over one interface. But in my case all packages go out over one interface.

View 13 Replies View Related

Ubuntu Multimedia :: Cp All The File Entries In This Playlist From Their Various Original Directories And Into One Target Directory?

Jun 14, 2010

I've got a few large, unsorted folders where I dump mp3s. I manage it all through rhythmbox and I've decided to separate the wheat from the chaff by paring down stuff I don't want and throwing all the desirable stuff into a big (~1,800 file) playlist file saved to my desktop.My question to you is, is there a hack that'll let me cp all the file entries in this playlist from their various original directories and into one target directory? Playlist format is:

Quote:
[playlist]
X-GNOME-Title=Biglist
NumberOfEntries=1823[code].....

View 3 Replies View Related

General :: Build A Glibc Version For Target Machine's Kernel?

Jan 8, 2010

AFAIK, in addition to implementing the standard C library, glibc provides wrappers for system calls, threading support, and basic application facilities. So because of that, glibc that will be used on my target system should be built based on the kernel version running on my target, right?

Based on the above, I am trying to build a glibc version for my target machine's kernel. However, I don't know to to build a glibc library for a target system and also where on the target's filesystem should be put? In which location Linux will start looking for the libraries required for a program to run (should I create an /etc/ld.so.conf file)?

View 12 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 :: Shell Script For Identifying The File And Zip All Files, Move The Files To Target Dir?

May 7, 2011

1. Every Sunday2. Find all files older than 1 day3. Gzip these file4. Tar up the gzipped files into one tar file.5. Name the tarball with a date stamp indicating what day it was created, so we know that week's files are in the file

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

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

Programming :: Search A Bunch Of Files In A Specific Folder For A Specific Number?

Jul 24, 2010

I need to search a bunch of files in a specific folder for a specific number and add all the numbers together to a total sum. I use Rsync everyday, everytime I run rsync i get a logfile (rsync output) witch contains the textstring "Total bytes sent: xxxxxx".

The "xxxxx" can vary in lenght. I need to extract the "xxxxxx" from each file and add the numbers together to a total size over a week or a month. Is this possible? And I wish to only use bash. One way of doing stuff at a time my friends .

View 5 Replies View Related

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

Debian Installation :: Install For A Target System / Create The Image On A USB Drive For The 586 Soekris Server On 686 HP Laptop?

Feb 16, 2010

I wish to use my laptop to create a system for my Soekris 4801. I don't want to take the server down for the lengthy install ( took 6 hours last time, Fedora 5 ). I want to create the image on a USB drive for the 586 Soekris server on my 686 HP laptop. Then scp the image to the Soekris and reboot and configure the server.

View 3 Replies View Related

CentOS 5 :: Differences Between Scsi-target-utils & Iscsi-target

May 8, 2009

I want to run ISCSI target on CentOS. Both "scsi-target-utils" and "iscsi-target" can be used.

They seem to have the same function.

Is there any significant difference between them, on performance or stability?

View 4 Replies View Related

General :: Rsync Not Deleting Files On Target

Sep 8, 2010

I'm using the command below to sync two directories. Problem is insted of deleting the files on the target directory it simply appends a ~ character at the end of the file name. Not sure why this is happening?I'd like to have all deletes on the source replicated on target.

View 2 Replies View Related

CentOS 5 :: Can't Create Directories In Ftp?

Feb 20, 2010

I can log in as root and create directories fine etc But when I ftp or when I try to use the file manager on plesk, I get a permission error when I try to create a directory anyone any ideas why it does this ? Also i have a wordpress blog and when I try to add a new theme the theme wont add, because it is unable to create the folder to put the new theme into so this seems to be teh same issue, ive tryed altering the folder permissions but this doesnt many any difference. is there a way to let my ftp and wordpress be able to create directories ?

View 19 Replies View Related

Ubuntu :: Create A Directories That Always Stay On Top?

May 6, 2011

have been working how to do this for a while finally getting around to asking....

as a long time windows user I have used a trick of creating directories that will always be the first ones displayed by using an _foldername model, for ex:

_temp
A dir
B dir
temp

assuming the four above are directories that is how they are sorted by default in windows and I commonly use this technique for special folders.

for my virtual machines folder in windows looks like this:

_base
LX-Ubuntu9.1
LX-Ubuntu11.4
XP-TestVM
...

where I put base virtual machines in _base and it makes it easy to separate them for all the other folders which are virual machines....SO....

in Ubuntu, I cant figure out a character or way to ensure this type of behavior, for example if I create a _base folder it shows up after a dirs and around the bs etc...

any know a way to create a dir with a special char that will ensure it stays on top?

View 3 Replies View Related

Red Hat :: Create And Configure Set-GID Directories For Collaboration?

Feb 21, 2011

I'm studying for the RHCSA certification (Tautology?) and I'm struggling a bit with this objective Quote:Create and configure set-GID directories for collaborationI've followed the instructions on the deployment guide (except that I created a different directory):
http://docs.redhat.com/docs/en-US/Re...ers_and_GroupsYet, whenever I create a file in this new directory (logged in as a member of the owning group), permissions are set to 644, so other group members cannot edit the files.I checked the umask value and it's set to 0022 and the permissions on the directory are set to 2775

View 3 Replies View Related







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