Tag: folder

Copying a directory

Copying a directory cp -a dir1 dir2

Delete Multiple Folders

Remove two directories and their contents recursively rm -rf dir1 dir2

Remove a Directory Recursively

Remove a directory called ‘dir’ and contents recursively rm -rf dir

Seach for a String in a Folder using grep

Search string “test_text” at directory ‘/var/log’ and below grep test_text -R /var/log/*

Show Space Usage of a Directory

Estimate space used by directory. du -sh dir

Command to io to Previous Folder

Go back to the previous folder cd –

Create a Directory Tree in One Command

You can create a directory tree using just one command in Linux mkdir -p /tmp/dir1/dir2

Recursive Grep

Recursively check a folder to find the given text using grep grep -R “text” *

Listing all Files Recursively in Windows

Save the list of all files in a folder in windows – recursively. dir /s /b>FileList.txt [tags]command, dir, directory, folder,…

Search Text in a Folder using grep

Search for a specific text in a folder using grep grep “fetchFeedPacksCustomize()” *.js [tags]grep,search,text,folder[/tags]