10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
Is there a way to stop root from writing to a directory? I already tried chattr but that did not seem to work.
chattr +i directory (12 Replies)
Discussion started by: cokedude
12 Replies
2. Shell Programming and Scripting
Given a directory containing say a few thousand files,
please output a list of all the names of the files in the directory that are exactly the same, i.e. have the same contents.
func(a_directory_name) output -> {“matches”: , ... ]}
e.g. func(“/home/my/files”) where the directory... (7 Replies)
Discussion started by: anuragpgtgerman
7 Replies
3. UNIX for Dummies Questions & Answers
Hi,
I would like to write a loop to change the names of files in a directory. The files are called data1.txt through data1000.txt. I'd like to change their names to a1.txt through a1000.txt. How do I go about doing that? Thanks! (2 Replies)
Discussion started by: evelibertine
2 Replies
4. Shell Programming and Scripting
I am trying to write a script that once executed it will search within a directory and copy only the newest directory that has not been copied before to a new location. Kind of like what ROBOCOPY /M does in windows?
The directories are not left in the new location so using a sync action won't... (2 Replies)
Discussion started by: Keriderf
2 Replies
5. Programming
I am trying to write .pgm images using the O_DIRECT flag in open().
I have a char* buffer which has the image data.
I know that I have to align the buffers and have done that using posix_memalign() yet only a part of the image gets written.
Has someone used O_DIRECT for writing files... (3 Replies)
Discussion started by: anchit87
3 Replies
6. UNIX for Dummies Questions & Answers
Is there a command in shell-script that I can use that copies a string or writes it to many files? Say I have files a, b and c and I want to copy or write the text "Hallo, I am a newbie!" to all these files? I know I can do echo "Hallo, I am a newbie!" > a but this only copies it to one file. How... (2 Replies)
Discussion started by: #moveon
2 Replies
7. Shell Programming and Scripting
Hey Guys,
I was wondering if someone would give me a hand with an issue I'm having, let me explain the situation:
I have a file that is constantly being written to and read from with updated lines:
# cat activity.file
activity1
activity2
activity3
activity4
activity5
This file... (2 Replies)
Discussion started by: bashshadow1979
2 Replies
8. Shell Programming and Scripting
Hi All,
I am new user of shell scripting has come up with a problem. that I have a directory structure like :
Home
|
|--------A
| |----trunk
| |-------A_0_1/
| |
| |-------A_0_2/
|
|--------B
| ... (6 Replies)
Discussion started by: bhaskar_m
6 Replies
9. UNIX for Dummies Questions & Answers
thanks guys i managed to answer (0 Replies)
Discussion started by: bebop1111116
0 Replies
10. Shell Programming and Scripting
I have to do a directory clean up on several machines. The task is as follows:
go to a particular directory (cd /xxx)
1. create a directory ' SCRIPTCLEANUP ' ( i KNOW IT)
loop through
2. List the directory
3. if directory and start with 'DQA' leave it,
4. if directory or file move it to... (0 Replies)
Discussion started by: ajaya
0 Replies