General :: Making A Folder And All Its Files Read Only Via Script?
Jul 14, 2011
Quick question. I need to ensure that all my files within specific folders are marked as being read only if the folders name is 'Forms' for example. There may be many 'forms' folders on the server within many different directories.It is a requirement that everything within these folders are marked as being read only but people are not doing so for whatever reason, and would therefore like for it to be done automatically i.e. a script executed by a cron job every eve to esnure that all files within the forms directories are marked read only.
View 1 Replies
ADVERTISEMENT
Jun 5, 2011
make a simple script to copy files from my "hfiles " directory to a "www" folder at leats I think its a directory, it has the permissions as "lrwxrwxrwx " but its like a public branch So I proceeded to make a file entittled MkPublic to copy the "hfiles" directory to the "www" branch
here is the code i used:
#!/bin/sh
# COPIES FILES
echo "copying files"
[code]....
when i try to run the script it tells me that there is a syntax error and an unexpected end of file and nothing seems to get copied anywhere so clearly there is something wrong with one im doing, i tried multiple ways : using the quotes, spacing the equal signs, but I seem to still get the same results.
View 8 Replies
View Related
May 7, 2009
Until now i haven't had to dabble with bash scripts.
I have a program that reads in data files. These are named datafile01_R, datafile01_G, datafile01_B, they then increment, so datafile02_R etc i have about 600 of these. the program reads in 3 data sets at a time from each run, so files_01 r, g, and b.
The program then does its magic, and outputs about 40 different files, depending on the file, they gone to folders named R, G, B, psa, or tracking.
The program itself has configuration files to say where the files should gone when analyzed, there is also the config files that reads in the data sets.
At the moment i have to run one set of data, then go in and manually change the input file location, and run again. But, doing this, even though a different data set, the new set overwrites the old set in one of the output folders. So i need a way to increment the output filenames after they are written and before the program is run again with the new data set.
View 1 Replies
View Related
Aug 6, 2010
I am trying to make my first tar file in linux. I am trying to make a tar file from a folder (with all subfolders and files) and using several commands I got several errors!
This is the tar usage:
tar [-]{txruc}[eONvVwAfblhm{op}][0-7[lmh]] [tapefile] [blocksize] [[-C directory] file] ...
Some of my attempts and responses:
tar -czf itic_glb_cognity-06082010.tar.gz itic-glb-cognity/
response: tar: z: unknown option (not using 'z' again!)
tar -cf itic-glb-cognity-06082010.tar.gz itic-glb-cognity/
response: tar: cannot stat itic-glb-cognity. Not dumped.
The last ones repeats for all the next attempts:
tar -cf itic-glb-cognity-06082010.tar.gz itic-glb-cognity
tar -cf iticglbcognity06082010.tar.gz itic-glb-cognity/
(full path + name without spaces) tar -cf iticglbcognity06082010.tar.gz /epos/webbus/bea/user_projects/domains/itic-glb-cognity
For some of the above a 10kb file was created, where the expected file would be about 250MB. I dont think it has anything to do with the user's rights, because I think I have them all.
View 6 Replies
View Related
Jul 16, 2011
I want my samba to keep my windows attributes exactly what the user setted in windows I mean if it has read only file in win box and copy it to samba share ,samba keep it read only and same for other attributes but it does not do it now with my configuration:Quote:
[global]
workgroup = DOMAIN
server string = File Server
[code]...
View 3 Replies
View Related
Nov 23, 2010
In Linux bash shell, for a given directory, how can I list:The create date for that directory The number of files in that directory The number of subdirectories in that directory.
View 3 Replies
View Related
Sep 10, 2009
How would i go about copying all .jpg or .JPG files from a folder and all its subfolders to my /usr/name/pictures folder? I'm guessing I'd have to use some sort of .[jJ][pP][gG] to get all the pictures from other examples i've seen, but really not sure how to use that in a recursive cp.
View 14 Replies
View Related
Mar 19, 2010
Recently updated the kernel in Ubuntu 9.10 and for some reason now, a folder which was not read-only now is. I can't delete anything from it. Have tried using the GUI for changing permissions, however, it has a mind of it's own and won't unlock the folder.
Anyone had this happen where a folder locked when you didn't want it to be?
View 4 Replies
View Related
Mar 4, 2010
i need to copy files from a folder called output files to another folder called running but im not able to do it i always get a stat error
View 14 Replies
View Related
Nov 3, 2010
I got a folder that I transfer stuff to all the time. the folder is in chmod 775 but when i upload folders and files, they are given chmod 700, but i want it chmod 775 everytime i upload something. so far i have logged in to my linux computer and did a chmod -R 775 to the folder every time i uploaded something to it. is there a function somewhere to make it 775 everytime i upload or can i have something run a script, so i don't have to go in and write it everytime i upload something?
View 2 Replies
View Related
Dec 5, 2010
I want to find files containing the "$" char (ascii 0x24). 'Grep -irl $ *' would output the names of every file in path *, of course, because it means end of line (EOL). So giving grep the string "$" won't do. So I tried 'grep -irl $ *'. But this doesn't work either and I do not understand why. Am I not escaping the dollar sign? grep should interpret it literally. Neither 'grep -irl "$" *' will work. Fortunately, there's LQ, besides grep's man page.
View 9 Replies
View Related
Feb 4, 2011
allow specific user permission to read/write my folder
I have a folder called /TAR/Sketch
I added a new user, named Snoopy, I want to grant this user the ability to add files & directories to this folder which is under the group Sketches and the owner is me.
How can I accomplish this ?
View 1 Replies
View Related
Nov 15, 2010
I was wondering if there is a way to tell rsync to only apply changes (delete, overwrite,create) only if all files in the file list transferred successfully.Just to clarify, this would essentially be putting a transaction around the transfer.
View 3 Replies
View Related
May 31, 2011
Kernel 2.6.21.5, Slackware 12.0
Code:
bash-3.1$ cat /etc/cron.daily/slocate
#!/bin/sh
[code]...
View 10 Replies
View Related
May 10, 2011
I am trying - to no avail - to take an old script I found in the forum help-needed-in-grep-for-tar-gz-658730/ The code:
Code:
#!/bin/bash
if zgrep $1 $2 > /dev/null 2>&1
[code]....
View 3 Replies
View Related
Mar 16, 2011
I'm having difficulty making my FAT32 drive capable of read/write. I followed the instructions here (http://ubuntuguide.org/wiki/Ubuntu:Maverick#Windows_Compatibility) and added the following line to my /etc/fstab file:
Code:
/dev/sda4 /media/WinD vfat quiet,defaults,rw 0 0
However, when I rebooted the drive is still read-only
View 4 Replies
View Related
Jun 8, 2010
I have many files and folders in my source folder. I want to copy some files and folders from that source folder to destination folder. What should be require to given with the "cp" command?
View 1 Replies
View Related
Mar 20, 2010
I wanted to queue up all audio files in particular folder which also has .txt files.I tried$find /data/songs -iname '[^txt]' -exec totem --enqueue '{}' ';'Thinking that this will exclude txt like expression in 'grep'.It did not work
View 2 Replies
View Related
Jul 9, 2010
I am facing some problems in font rendering issue for Urdu (South Asian language). Actually the alphabets are being displayed as, for example, "a p p l e" instead of "apple" - if you see this website, probably you will see the gaps in alphabets are making them difficult to read.
I have installed at least 10 different Urdu fonts but still no help, then I tried adding:
MOZ_DISABLE_PANGO="0" to /etc/environment but it also did not helped.
I am using OpenSuse 11.2, Firefox 3.5.10
View 7 Replies
View Related
Jun 25, 2010
I'm trying to make my first c project (a simple tic tac toe console game), and I am wondering how to make a final product (copy all source code files to a distribution folder upon compilation). Should I use a bash script or should I use a makefile to make the distribution folder? I'm not terrible familiar with either; I have a basic makefile to make an executable, and that's about all I know of make.
And if I do use a bash script, how do I copy over source code files? I tried cp ./*.c and cp ./*.h, but I think the script read it literally as moving a file named ./*.c (and ./*.h), and couldn't find it.
My makefile is pretty much this:
Code:
objectFiles = main.o io.o board.o game.o
ttt : $(objectFiles)
cc -o ttt $(objectFiles)
View 2 Replies
View Related
Aug 11, 2010
How do I change folder permissions without changing the permissions of the files within the folder?
View 6 Replies
View Related
May 7, 2011
I have a fresh install of Kubuntu 11.04 and I already have the lastest ecryptfs-utils installed. I have the ".Private" folder but not the "Private" folder.
When I try to set it up I get this error:
Quote:
$ ecryptfs-setup-private
ERROR: wrapped-passphrase file already exists, use --force to overwrite.
How do I get my "Private" folder to appear? I don't think I should just be throwing my stuff into ".Private" and I don't want to have to see all the hidden folders all the time either. Should I use the --force argument, and what would that do?
View 1 Replies
View Related
Jun 19, 2010
Linux kernel 2.6, GNU, Slackware 12.0
KDE 3.5.7
How can I read .docbook files? If I click the name in the desktop, it asks me for an app to open it.
View 6 Replies
View Related
Aug 10, 2009
I have 2 pty devices (/dev/ptya0 -master & /dev/ttya0 -slave). i am able to open both devices. Both devices file descriptor is same. i am writing to master pty but while reading from the slave its not reading.
Sample code:
Slave:
View 1 Replies
View Related
Nov 21, 2010
I tried compiling linux kernel 2.6.37-rc2 (mainline), Compilation and installation of kernel and modules went fine. After that while trying to make initrd image, I used the following command :-
mohitdhingras@mohitdhingras-laptop:~$ sudo mkinitramfs -o initrd.img-2.6.37-rc2 2.6.37-rc2
It is showing warnings like :-
W: Possible missing firmware /lib/firmware/2.6.37-rc2/radeon/RV610_me.bin for module radeon
W: Possible missing firmware /lib/firmware/2.6.37-rc2/radeon/RV610_pfp.bin for module radeon
W: Possible missing firmware /lib/firmware/2.6.37-rc2/radeon/R600_me.bin for module radeon
W: Possible missing firmware /lib/firmware/2.6.37-rc2/radeon/R600_pfp.bin for module radeon
Actually, "2.6.37-rc2" folder is missing in "firmware".
View 6 Replies
View Related
Jan 24, 2010
I'm needing to read the Adam's Assembly Tutorials, that are old EDIT *.txt files, I'm on Linux and I need to read this files.What can I do?Is there any GUI editor that can read the files?There is any way to convert them into another file that is more modern1?
View 2 Replies
View Related
Jan 20, 2010
This happens in my main computer with Slackware and Arch.
Code:
$ su
Password:
# cd /media/fl
[code]....
View 7 Replies
View Related
Sep 8, 2009
Such as the title
View 2 Replies
View Related
Jul 9, 2011
I am using ubuntu but I am reading a windows harddisk via USB.Apparently some files does not appear and it cannot read zip files.
View 4 Replies
View Related
Oct 4, 2010
I have a number of versions of gnome installed on a number of different hosts. All users have network mounted home directories. In some cases gnome works poorly when reading configuration from the .gnome2 directory. I would like to read config files from version specific directories. Is there any way to specify this when starting gnome? Environment variables perhaps? I know how to move the .gconf directories but this is not sufficient. I need to read the .gnome2 from a different path.
View 1 Replies
View Related