Hello,
I am uning IRIX64. I need to do an ls - 1 (one) command in order to get a one colum listing of the contents of a non current directory:
t01:~ [119] > ls -1 /scratch/u118807/reconstruct
./
../
fr000202.rec
fr000202.sin
input_files/
input_files.tar
sin000000.rec
sin000000.sin
sym000000.raw
Now, I need to list ONLY the files with extensions .raw, .sin, or .rec as follows:
t01:~ [120] > ls -1 /scratch/u118807/reconstruct/*.{rec,raw,sin}
/scratch/u118807/reconstruct/fr000202.rec
/scratch/u118807/reconstruct/fr000202.sin
/scratch/u118807/reconstruct/sin000000.rec
/scratch/u118807/reconstruct/sin000000.sin
/scratch/u118807/reconstruct/sym000000.raw
The problem above is that I do not want the path in front of the files, I only want the filenames by themselves:
fr000202.rec
fr000202.sin
sin000000.rec
sin000000.sin
sym000000.raw
I do not want to "cd" to the directory "/scratch/u118807/reconstruct" to achieve what I want, I want to do everything from the home directory.
I tried using pipes in order to do this, but it did not work.
Any ideas?
Thanks,
--CS
I am uning IRIX64. I need to do an ls - 1 (one) command in order to get a one colum listing of the contents of a non current directory:
t01:~ [119] > ls -1 /scratch/u118807/reconstruct
./
../
fr000202.rec
fr000202.sin
input_files/
input_files.tar
sin000000.rec
sin000000.sin
sym000000.raw
Now, I need to list ONLY the files with extensions .raw, .sin, or .rec as follows:
t01:~ [120] > ls -1 /scratch/u118807/reconstruct/*.{rec,raw,sin}
/scratch/u118807/reconstruct/fr000202.rec
/scratch/u118807/reconstruct/fr000202.sin
/scratch/u118807/reconstruct/sin000000.rec
/scratch/u118807/reconstruct/sin000000.sin
/scratch/u118807/reconstruct/sym000000.raw
The problem above is that I do not want the path in front of the files, I only want the filenames by themselves:
fr000202.rec
fr000202.sin
sin000000.rec
sin000000.sin
sym000000.raw
I do not want to "cd" to the directory "/scratch/u118807/reconstruct" to achieve what I want, I want to do everything from the home directory.
I tried using pipes in order to do this, but it did not work.
Any ideas?
Thanks,
--CS