10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I wish to delete all files that starts with "body<any number of digits>.xml" except body65.xml on Linux 7 bash shell
So, from the below files
body64.xml
body.sh
body65.xml
body655.xml
body565.xml
body66.xml
hello65.xml
My command should delete all files except the below.
body.sh... (2 Replies)
Discussion started by: mohtashims
2 Replies
2. UNIX for Dummies Questions & Answers
Hi All,
I want to fetch the files based on .done file and display the .csv files and Wil take .csv files for processing.
1.I need to display the .done files from the directory.
2.next i need to search for the .Csv files based on .done file.then move .csv files for the one directory
... (2 Replies)
Discussion started by: girija.g6
2 Replies
3. 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
4. Shell Programming and Scripting
Hi
I Have a directory and i have some files below
abc.txt
abc.gif
gtee.txt
ghod.pid
umni.log
unmi.tar
How can use glob function to grep abc files , i have created a variable "text" and i assigned value as "abc", please suggest me how can we use glob.glob( ) to get the output as below... (2 Replies)
Discussion started by: kumar85shiv
2 Replies
5. Shell Programming and Scripting
Hi all...
I am trying to copy all my shell script to some directory using following command, I want to simplify it by not using awk..please some one help me....
find -name "*.sh" | awk -F"/" '{a=$NF;gsub(".sh",x,a);cmd="cp"" " $0" ""/home/akshay/MY_ALL/"a"_"++i".sh";system(cmd)}' (3 Replies)
Discussion started by: Akshay Hegde
3 Replies
6. Shell Programming and Scripting
I'm sure this has been asked many times, but a search didn't turn up a definitive best method for this (if there ever is such a thing).
I have been using rsync to back up my main data directory, but I have accumulated a large number of older backups that I don't need. All of the files I don't... (14 Replies)
Discussion started by: LMHmedchem
14 Replies
7. UNIX for Dummies Questions & Answers
Hi,
I know that to list files with no extension, we can use..
ls -1 | grep -v "\."
And to list .prog files, we can use..
ls -1 *.prog
or
ls -1 | grep '.prog$' (4 Replies)
Discussion started by: adshocker
4 Replies
8. UNIX for Dummies Questions & Answers
Hi,
I am using scp to copy a certain directory over the network. This folder contain some files that I am not interested in. My question is; is it possible to copy files of certain extension only, keeping the same directory hierarchy as it is (that is sub-folders)?
Thanks (8 Replies)
Discussion started by: faizlo
8 Replies
9. Shell Programming and Scripting
Hi,
I have 1000 of files in a folder with the file extension as .csv
In this some of the files are already zipped and its looks like filename.csv.gz
Now i need to zip all the files in the folder to free some disk space. When i give gzip *.csv
It prompts me to overwrite filename.csv.gz... (5 Replies)
Discussion started by: nokiak810
5 Replies
10. HP-UX
I am brand new to hp unix systems. I see some files without extension on this system. If I type name of the file it shows me so many detail but does not take me back to command prompt. What are these files and how do I come back to command prompt? Please help (1 Reply)
Discussion started by: rajahindustani
1 Replies