Browsed by
Day: April 9, 2015

How To Display Folder Only in Bash Using ls command?

How To Display Folder Only in Bash Using ls command?

Today I give you three ways to display folder only in bash using ls command. Here’s the demonstration: Step 1: Using echo saggi@saggi-A6200:~/Desktop$  echo */ Metasploit And Backtrack Videos/ password crack/ saggifoldear/ Untitled Folder Step 2: Using ls only. saggi@saggi-A6200:~/Desktop$   ls -d */ Metasploit And Backtrack Videos/ saggifoldear/ password crack/ Untitled Folder/ Step 3: Using ls and grep . saggi@saggi-A6200:~/Desktop$  ls -l | grep “^d” drwx—— 9 saggi saggi  4096 Mar 15 22:48 Metasploit…

Read full Article Read More

How to display file only in bash?

How to display file only in bash?

My last article was to display folder only using “ls” command, this time I want to share how to display files only in bash. Step 1: For this it is easy to use “find” command which is pre-installed in most of the Linux distro available in the market. Here is the command snippet:    :/> find .  -maxdepth 1 -type f using -maxdepth 1 ensure that your search remains only in the current directory (if…

Read full Article Read More