10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I am writing a code that can move and archve all the files in a directory except the latest file based on file pattern provided in a controlfile.
The filename is in the form of pattern. So basically we find the all the files of the pattern provided and archive all of them, leaving one latest file.... (3 Replies)
Discussion started by: Saanvi1
3 Replies
2. Shell Programming and Scripting
I think I must be missing something obvious but I have a file containing a list of files and paths, some with wildcard, others with spaces. e.g.
/this/is/a/file
/this/is/a/directory/
/this/is/a/collection/*
/this/has spaces/in/it
/this/had spaces/and/list/of/files*... (6 Replies)
Discussion started by: mij
6 Replies
3. Shell Programming and Scripting
I need to list and delete all files in current older which are olderthan 7 days. But my file names have white spaces. Before deleting I want to list all the files, so that I can verify.find . -type f -mtime +7 | xargs ls -l {}
But the ls command is the working on the files which have white... (16 Replies)
Discussion started by: karumudi7
16 Replies
4. Shell Programming and Scripting
For the record, I already tried telling mgmt and the users to disallow spaces in filenames for this script, but it isn't happening for a number of ID10T-error-based reasons.
I have simple list of 3 files in a directory that are named like this:
bash-3.2$ ls -1 file*
file1
file1 part2... (2 Replies)
Discussion started by: ckmehta
2 Replies
5. UNIX for Advanced & Expert Users
OS: RHEL 5.8
shell: bash 3.2.25
Directory /home/guest/ contains these files:
file a
file b
file c
fileD
fileE
fileF
testFile.txt
I'm trying to find the syntax to run ls -ltr against this list of files that is contained within a text file, testFile.txt.
The file testFile.txt has... (4 Replies)
Discussion started by: uschaafm
4 Replies
6. Shell Programming and Scripting
Hi experts,
I have the following data: I want the last filed in the output.
How to print the last field , It contains the file names and few filenames with white spaces .
-rw-r--r-- 1 root root 0 2010-04-26 16:57 file1 2space_File.txt
-rw-r--r-- 1 root root 0 2010-04-26... (2 Replies)
Discussion started by: rveri
2 Replies
7. Shell Programming and Scripting
I have a text file containing files in a directory structure i.e.
/project/hr/raw/jcpdatav/datav_aug03
/project/hr/raw/jcpdatav/comb8121sep02n
/project/hr/raw/jcpdatav/datav_feb04_ons
/project/hr/raw/jcpdatav/corpsick_jun06
/project/hr/raw/jcpdatav/jcpjoiners200507... (3 Replies)
Discussion started by: mr_crosby
3 Replies
8. Shell Programming and Scripting
I'm trying to run a Linux virus scan on a list of files/folders I have ported to list.txt in a format:
some file with spaces
some other file
but I need to feed my scanning script in the format:
some\ file\ with\ spaces/
some\ other\ file/
so I would like to read in list.txt and output... (6 Replies)
Discussion started by: unclecameron
6 Replies
9. Shell Programming and Scripting
Hi,
I want to list all the files matching in a directory directory given below
Here one of the folder has a space in the path.
/MAS02/RMS/WBDev/Krishna/Krishna Mohan/FMSplitByKeyAfterChanges1000075383.fileman.*.txt.out.1000075383.0
The following works from command line... (1 Reply)
Discussion started by: hikrishn
1 Replies
10. Shell Programming and Scripting
Ok, I have this script that will look for files with the .pl4 extension and rename them with the modification date... But it breaks when the file has a space in it... (files are on windows machine) ive been trying to fix it but no luck.... Any help is greatly appriciated..
#! /bin/sh
for file... (1 Reply)
Discussion started by: Jay5487
1 Replies