10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi
My directory structure is as below.
dir1, dir2, dir3
I have the list of files to be deleted in the below path as below.
/staging/retain_for_2years/Cleanup/log $ ls -lrt
total 0
drwxr-xr-x 2 nobody nobody 256 Mar 01 16:15 01-MAR-2015_SPDBS2
drwxr-xr-x 2 root ... (2 Replies)
Discussion started by: prasadn
2 Replies
2. Shell Programming and Scripting
he following are the files available in my directory
RSK_123_20141113_031500.txt
RSK_123_20141113_081500.txt
RSK_126_20141113_041500.txt
RSK_126_20141113_081800.txt
RSK_128_20141113_091600.txt
Here, "RSK" is file prefix and 123 is a code name and rest is just timestamp of the file when its... (7 Replies)
Discussion started by: kridhick
7 Replies
3. Shell Programming and Scripting
Hello,
I need to move all the files inside /XYZ (has multi-depth sub directories) that are older than 14 days to/ABC directory but with retaining the SAME directory structure.
for example:
/XYZ/1/2/3/A/b.txt should be moved as /ABC/1/2/3/A/b.txt
I know about find /XYZ -type f -mtime +14... (3 Replies)
Discussion started by: prvnrk
3 Replies
4. Shell Programming and Scripting
So, I have a directory tree that has many files named thusly:
X_REVY.PDF
I need to find any files that have the same X portion (which can be nearly anything) as any another file (in any directory) but have different Y portions (which can be any number from 1-99).
I then need it to return... (3 Replies)
Discussion started by: Kamezero
3 Replies
5. Shell Programming and Scripting
Hi,
I have file in my $datadir as below :-
SAT_1.txt
SAT_2.txt
BAT_UD.lst
BAT_DD1.lst
DUTT_1.txt
DUTT_la.txt
Expected result :-
should get all the above file in $<Filename>_file.lst
Below is my code :-
for i in SAT BAT DUTT
do
touch a.lst
cd $datadir (1 Reply)
Discussion started by: satishmallidi
1 Replies
6. Shell Programming and Scripting
Hi,
I am new in unix.
I have below requirement:
I have two files at the same directory location
File1.txt and File2.txt (just an example, real scenario we might have File2 and File3 OR File6 and File7....)
File1.txt has :
header1
record1
trailer1
File2.txt has:
header2
record2... (4 Replies)
Discussion started by: Deepak62828r
4 Replies
7. Shell Programming and Scripting
Hello I'm trying to do an exercise programming in bash where I have to get only the store of files in a directory but NOT all capacity of the directory.
I probe with: du -sh "$directory"*` but I get all the capacity and I probe with ls command but I couldnt.
Are there any way to get only files... (2 Replies)
Discussion started by: adiegorpc
2 Replies
8. AIX
Hi, what happened is we want to count all the files in a directory and inside this directory got many folders and so take long time to count it. Already run for about few minutes but still not done. The command we use to count is find . -type f | wc -l
Just wondering if there is any other... (9 Replies)
Discussion started by: ngaisteve1
9 Replies
9. Shell Programming and Scripting
Hello,
I have several files in a specific directory.
A specific string in one file can occur in another files.
If this string is in other files. Then all the files in which this string occured should be deleted and only 1 file should remain with the string.
Example.
file1
ShortName "Blue... (2 Replies)
Discussion started by: premier_de
2 Replies
10. Shell Programming and Scripting
Hi Team,
I am new to scripting. I want to create a script, which needs to keep only 5 days directories and want to remove the old directory from a particular directory. Can Somebody help me with starting this script.
All my directories will be created in the name <YYYYMMDD>.
Thanks... (2 Replies)
Discussion started by: siva80_cit
2 Replies