Skip to content

Commit dce666d

Browse files
added ex for tree command, links for rename
1 parent 1c89284 commit dce666d

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

Files_and_Directories.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,32 @@ chrome_bookmarks_02_07_2018.html dot_files/
264264
Python_workshop_2017.pdf Scripting_course_2016.pdf
265265
```
266266

267+
* `tree` command displays contents of a directory recursively as a tree like structure
268+
* you might have to install this command or have an equivalent command like `gvfs-tree`
269+
270+
```bash
271+
$ # -h option will show hidden files
272+
$ gvfs-tree -h
273+
file:///home/learnbyexample/ls_ex
274+
|-- backups
275+
| |-- chrome_bookmarks_02_07_2018.html
276+
| `-- dot_files
277+
| |-- .bashrc
278+
| |-- .inputrc
279+
| `-- .vimrc
280+
|-- ch.sh
281+
|-- hello_world.py
282+
|-- ip.txt
283+
|-- palindrome.py
284+
|-- power.log
285+
|-- projects -> ../projects/
286+
|-- report.log
287+
|-- todo
288+
`-- workshop_brochures
289+
|-- Python_workshop_2017.pdf
290+
`-- Scripting_course_2016.pdf
291+
```
292+
267293
* often, we want to prune which files/directories are to be listed
268294
* commands like `find` provide extensive features in this regard
269295
* the shell itself provides a matching technique called glob/wildcards
@@ -594,6 +620,7 @@ backups low_power_adders word_lists words_ref.txt
594620

595621
* [rename Q&A on unix stackexchange](https://unix.stackexchange.com/questions/tagged/rename?sort=votes&pageSize=15)
596622
* See [Perl one liners](https://github.com/learnbyexample/Command-line-text-processing/blob/master/perl_the_swiss_knife.md) for examples and details on Perl substitution command
623+
* Some more `rename` examples - [unix.stackexchange: replace dots except last one](https://unix.stackexchange.com/questions/315586/replacing-dots-in-file-name-with-underscores-except-the-extension/315589#315589) and [stackoverflow: change date format](https://stackoverflow.com/questions/40286513/converting-date-format-in-bash/40288150#40288150)
597624

598625
<br>
599626

0 commit comments

Comments
 (0)