10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I found this awesome sed script here:
https://www.unix.com/shell-programming-scripting/48228-perl-search-string-line-then-search-replace-text.html
sed -i '/MatchText/ s/ReplaceMe/REPLACED/' filename
Question though to save me manually doing this.
How do I do this from a root directory... (6 Replies)
Discussion started by: Astrocloud
6 Replies
2. Shell Programming and Scripting
I have 2 directories a/ and b/,
they have different subdirectories, how to diff with missing file, or missing subdirectory
and if i have in a/ directory "a/ACD/DEF" DEF is a file, but in b/ directory "b/ACD/DEF is a SUBDIRECTORY, how to diff it, thanks
my solution for directories,
... (7 Replies)
Discussion started by: knajta
7 Replies
3. Shell Programming and Scripting
:(
---------- Post updated at 01:51 AM ---------- Previous update was at 01:50 AM ----------
Not working
---------- Post updated at 02:04 AM ---------- Previous update was at 01:51 AM ----------
cp -p /home/* home/exp/*.`date`
i am using this (4 Replies)
Discussion started by: rishiraaz
4 Replies
4. Shell Programming and Scripting
Here is my question in bash
for f in f1 f2
do
cd $f
cd ??? # i need to enter the two layers of sub folders then find the folder named "abcde" ?
cd .. # how to get out two layers subdirectories?
cd ..
done (3 Replies)
Discussion started by: ksgreen
3 Replies
5. UNIX for Dummies Questions & Answers
Here is my question in bash
for f in f1 f2
do
cd $f
cd ??? # i need to enter the two layers of sub folders then find the folder named "abcde" ?
cd .. # how to get out two layers subdirectories?
cd ..
done (2 Replies)
Discussion started by: ksgreen
2 Replies
6. Solaris
Hi all
i am using solaris 10, i am creating user with
useradd -d/home/user -m -s /bin/sh user
user is created with in the following path
/export/home/user (auto mount)
i need the user to be created like this
(/home as default home directory )
useradd -d /home/user -m -s /bin/sh... (2 Replies)
Discussion started by: kalyankalyan
2 Replies
7. Programming
I'm trying to make use of mkdir(char *pathname, S_IRWXU) to create the directories.
but it only creates one directory at a time. so I have to separate the tokens for "/home/blah1/blah2/blah3" as "home blah1 blah2 blah3" using delimiter "/", but it is again hectic to create such directory... (8 Replies)
Discussion started by: platinumedge
8 Replies
8. UNIX for Dummies Questions & Answers
Hi,
How to loop through all the subdirectories in a directory, merge the files present in it to a single file in that subdirectory itself and remove the original files?
Please advise. (5 Replies)
Discussion started by: er_ashu
5 Replies
9. UNIX for Dummies Questions & Answers
Suppose I have two directories a and b. Each directory has a few subdirectories, a1 a2 a3 and b1, b2, b3 respectively.
Using ls, I can see a and b. Then I need cd a, ls, cd ../b, ls to see all the subdirectories.
How to see all the directories and subdirectories easily, say using just one... (2 Replies)
Discussion started by: fld2007
2 Replies
10. UNIX for Dummies Questions & Answers
Dear All,
I want to write the Unix command that searches through all subdirectories, finds the files named ''core'' and deletes them.
I will very much appreciate your help.
David (4 Replies)
Discussion started by: david_wang
4 Replies