Visit Our UNIX and Linux User Community


Ordenar Carpetas o Archivos


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Ordenar Carpetas o Archivos
# 1  
Old 11-24-2010
Ordenar Carpetas o Archivos

Hola tengo el siguiente script

#!bin/bash

cd $1

ls -lS $1

Me muestra de orden por tamaņo de archivos de mayor a menor ./miscript.sh /root por ejmplo. Como puedo asignarle si al final de comando ponga -d me mustre solos las carpetas o si es -a me muestre los documentos.

./miscript.sh /root -d Carpetas
./miscript.sh /root -a documentos
Smilie
# 2  
Old 11-24-2010
Hello.

Per our forum rules, all posts must be in English.

We do provide translation services for posts from English to a number of languages as a benefit to users. However, posts must be in English.

Please repost in English.

Thank you for your cooperation.

The UNIX and Linux Forums.

Previous Thread | Next Thread
Test Your Knowledge in Computers #244
Difficulty: Medium
Networking research in the early 1970s by Robert E. Kahn and Vint Cerf let to the formulation of the Transmission Control Program (TCP), and its specification in December 1974 in RFC 699.
True or False?

1 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Comparar 2 archivos y agregas lineas faltantes

Hi I have 2 files where i save the IP adress of many printers that work on UNIX, one of these files, which is the 'Main File', is on a server call PROD, and the other one is on a different server call Al. What I want, is to make a comparison between the 2 files, and then, copy the IPs that... (4 Replies)
Discussion started by: Athlon1
4 Replies

Featured Tech Videos