10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I wish to list only files along with the absolute path in a given directory on my AiX 6.1 system.
Below is the best I could do.
ls -p "/app/scripts"/*
This gives a a list of all filename along with folder names with absolute path non-recurrsive (without listing files in sub-directories)... (1 Reply)
Discussion started by: mohtashims
1 Replies
2. 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
3. UNIX for Dummies Questions & Answers
Requirement:
I need to ls all files based on date timestamp after a trigger file
In the below example, I need to pull only files uploaded after orders.bmk by date timestamp ascending.
ORDERS_0000000009877468.txt
ORDERS_0000000009877464.txt
ORDERS_0000000009877460.txt... (9 Replies)
Discussion started by: eskay
9 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. Shell Programming and Scripting
Hi,
I have a list of filenames in the format with Spaces in the filename.
As an example :
Sample File 1.txt
Sample File 2.txt
Sample File 3.txt.....I have about 100 files like this.
I am trying to create a block of code or use an available command to a) Create a file b) Put in some... (2 Replies)
Discussion started by: ban3rj33
2 Replies
6. UNIX for Dummies Questions & Answers
Hi,
Anyone can help me on how to list the file with spaces? Like I want to "ls" only the 2008 files.
2008 _overview102.jpg
2008 _overview103.jpg
2008 _overview106.jpg
2008 _overview677.jpg
2008 _overview680.jpg
2008 _overview110.jpg
2008 _overview682.jpg
2009 _overview4373.jpg
2009... (1 Reply)
Discussion started by: fspalero
1 Replies
7. Shell Programming and Scripting
Hi,
I have files with filenames as below.
SGM Daily Sales Email-en-us-05312012.xlwa
I want to rename it in .xls. I am writing a script to change this, as there can be multiple files in subfolders.
I have the following script.
#!/bin/ksh
for oldfile in $(find... (1 Reply)
Discussion started by: mac4rfree
1 Replies
8. UNIX for Dummies Questions & Answers
Hi all,
I've been tangoing with this one for a couple of days now and I'm still not making any progress.
Basically I'm trying to match three numbers in a string from a text file with matching numbers in a jpeg, and then copying the results to another folder.
Data looks like this:
Model:... (4 Replies)
Discussion started by: faceonline
4 Replies
9. Shell Programming and Scripting
Hi
I am having difficulty copying files from one dir to another due to a space in the names of the file with an extension .rtf
There are a group of files and the command am using is
cp `ls -rt /wlblive/home/whiops/ops/RTFs/*.rtf|head -20` /wlblive/home/jamshed
Since the files are... (3 Replies)
Discussion started by: jamshedj
3 Replies
10. Shell Programming and Scripting
Hello,
When I run following script
#!/bin/bash
cd ~/directory1
mv `ls -trF | grep -v / | tail -10 ` ~/directory2
works fine with filenames not having any space but runs into issues with filenames that have spaces tried with $file variable still doesnot work. Can someone help me (4 Replies)
Discussion started by: asakhare
4 Replies