Search Results

Search: Posts Made By: DSIReady
2,485
Posted By jim mcnamara
How about cd /user ls -t | awk 'FNR>10'...
How about

cd /user
ls -t | awk 'FNR>10' |
while read fname
do
mv $fname /archive/${fname}
done
2,485
Posted By Yoda
Instead of piping the output to mv you can try...
Instead of piping the output to mv you can try this:-
for file in `ls -t -c1 | sed -ne '11,$p'`
do
mv $file archive/
done
Showing results 1 to 2 of 2

 
All times are GMT -4. The time now is 07:01 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy