Calendario
Data: 12/05/2025
Ora: 23:33
« Maggio 2025 »
Lu Ma Me Gi Ve Sa Do
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31


Login


:


Choose your language:
deutsch english español français italiano português


Utenti
Persone on-line:
admins 0 amministratori
users 0 utenti
guests 2 ospiti


Sondaggio
Nessun sondaggio attivo in questo momento:
vecchi sondaggi


archlinux


Linux TimeLine


Unix TimeLine


CO2


Menu:

  • Home
  • Archivio News
  • Contatti
  • Download
  • Gallery
02 Cerca
Ricerca parole o frasi all'interno del sito.
Ricerca avanzata


25 30th


30 marchioCS


00 stat2019
[ 31-12-2019 statistiche ]

Statistiche


Voto


fondazione


calcolo distribuito


effetto


#341724 GNU/Linux
SaCarde

utility bash

help.pngcome elencare directory

- listano le directory presenti:


ls -d */



ls -l grep ^d




- lista directory ad albero


#!/bin/bash

#######################################################
# UNIX TREE #
# Version: 2.2 #
# By Dem Pilafian #
# File: ~/apps/tree/tree.sh #
# #
# Displays Structure of Directory Hierarchy #
# ------------------------------------------------- #
# This tiny script uses "ls", "grep", and "sed" #
# in a single command to show the nesting of #
# sub-directories. #
# #
# Setup: #
# % cd ~/apps/tree #
# % chmod u+x tree.sh #
# % ln -s ~/apps/tree/tree.sh ~/bin/tree #
# #
# Usage: #
# % tree [directory] #
# #
# Examples: #
# % tree #
# % tree /etc/opt #
# % tree .. #
# #
# Public Domain Software -- Free to Use as You Like #
# http://www.centerkey.com/tree #
#######################################################

echo
if [ "$1" != "" ] #if parameter exists, use as base folder
then cd "$1"
fi
pwd
ls -R grep ":$" \
sed -e 's/:$//' -e 's/[^-][^\/]*\//--/g' -e 's/^/ /' -e 's/-//'
# 1st sed: remove colons
# 2nd sed: replace higher level folder names with dashes
# 3rd sed: indent graph three spaces
# 4th sed: replace first dash with a vertical bar
if [ `ls -F -1 grep "/" wc -l` = 0 ] # check if no folders
then echo " -> no sub-directories"
fi
echo
exit




- lista file senza commenti


grep -v ^# $1
Postato Domenica 06 Luglio 2008 - 21:17 (letto 1515 volte)
Comment Commenti? Print Stampa


« Notizia precedente | Notizia successiva »

Le ultime notizie relative a questo argomento

Read debian 9 su sun ultra 10 (22/08/2017 - 16:43) letto 1479 volte
Read compressione archivi in Linux (30/07/2016 - 17:48) letto 1617 volte
Read Il sistema di web learning della Regione Toscana (16/10/2014 - 20:56) letto 1728 volte
Read avventura stampante HP D1360 (cartuccia colore) (22/05/2010 - 13:36) letto 2371 volte
Read utility bash (06/07/2008 - 21:17) letto 1515 volte

Tutte le notizie relative a questo argomento
help.png

original template by Aran Down.
FlatNuke Valid HTML 4.01! Valid CSS! Get RSS 2.0 Feed Mail me!
This is a free software released under the GNU General Public License. | Cookie Policy
Page generated in 0.0155 seconds.