Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

bash list all files in directory and subdirectories

# Bash-specific

# syntax 
ls -R <file-or-directory-to-find>

# example
ls -R *hotographi*
Comment

list all files in a directory and subdirectory linux

find . -type f -follow -print
Comment

dir command list all files and subdirectories

dir *.txt *.doc		# filter by extension (both doc and txt)
dir	/a:-d			# files only (no subfolders)
dir /s				# current directory and subfolders content
dir /s /a:-d		# files only (including subfolders)
dir > myfile.txt	# stored in myfile.txt (dir /s > myfile.txt with subfolders)
dir /o:[sortorder] 	# example:  dir /o:-s    (sort by decreasing size)
  N : By name (alphabetic).
  S : By size (smallest first).
  E : By extension (alphabetic).
  D : By date/time (oldest first).
  - : Prefix to reverse order.
Comment

PREVIOUS NEXT
Code Example
Shell :: grep output to file 
Shell :: git commit message conventions 
Shell :: dateformat npm 
Shell :: update hour linux 
Shell :: ls order by filename length 
Shell :: WSL Updating the Ubuntu OS 
Shell :: gvm not generated password 
Shell :: heroku cli 
Shell :: git push f head 
Shell :: zsh git aliases 
Shell :: Git push --help fast-forwards 
Shell :: homebrew install autoconf 
Shell :: conda create new environment in specified location 
Shell :: shell variables in unix 
Shell :: change git repository commmand 
Shell :: long path windows 
Shell :: How to install LAMP in CentOs? 
Shell :: git reset staged files 
Shell :: ufw block ip 
Shell :: git replace branch with another 
Shell :: how to add line number to a file 
Shell :: conda install dvc 
Shell :: edit a file linux 
Shell :: what is ssh key in github 
Shell :: custom jenkins dockerfile 
Shell :: conda update with environment from yml file 
Shell :: batch open url 
Shell :: apt install yarn 
Shell :: composer add package 
Shell :: how to install visual studio code in kali 
ADD CONTENT
Topic
Content
Source link
Name
8+5 =