User Tools

Site Tools

tools:bash:getting-started

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
tools:bash:getting-started [2024/05/20 04:02] โ€“ [Filesystem Traversal] Humphrey Boa-Garttools:bash:getting-started [2024/08/06 05:54] (current) โ€“ external edit 127.0.0.1
Line 95: Line 95:
   $ pwd   $ pwd
  
-Show file tree for //path//:+Show file tree for the directory //path//:
  
   $ tree path/   $ tree path/
Line 107: Line 107:
   $ ls   $ ls
  
-Display directory listing. Some options include:+Outputs a list of contents of the pwd. Some options include:
  
   * ''-F'' (With folders identified)   * ''-F'' (With folders identified)
Line 119: Line 119:
   * ''-i'' (Show inode number)   * ''-i'' (Show inode number)
  
 +To show the contents of the directory //foldername//, in a human-readable long listing format with folders and hidden dotfiles identified, you would use:
 +
 +  $ ls -lhAF foldername/
 ==== cd ==== ==== cd ====
  
Line 224: Line 227:
   $ grep searchterm path/   $ grep searchterm path/
  
 +For more information, see [[tools:grep|grep]].
 ===== Basic File and Directory Commands ===== ===== Basic File and Directory Commands =====
  
Line 279: Line 283:
 This command normally creates [[wp>Hard link|hard links]] by default. The ''-s'' flag directs ''ln'' to create a symlink instead of hard link. In 9/10 cases, you will probably only need to use symlinks. This command normally creates [[wp>Hard link|hard links]] by default. The ''-s'' flag directs ''ln'' to create a symlink instead of hard link. In 9/10 cases, you will probably only need to use symlinks.
  
-To use ''ln'' to add, say, an executable [[tools:appimage|AppImage]] to your account's personal /bin/ directory, and assign it a new shorthand name, you would run something like this:+To use ''ln'' to add, say, a symlink for an executable [[tools:appimage|AppImage]] to your account's personal /bin/ directory, and assign it a new shorthand name, you would run something like this:
  
   $ ln -s path/to/the.appimage ~/.local/bin/newname   $ ln -s path/to/the.appimage ~/.local/bin/newname
Line 307: Line 311:
   $ rm ./*   $ rm ./*
      
-Delete all files within directory /foldername/:+Delete all files within directory //foldername//:
  
   $ rm foldername/*   $ rm foldername/*
Line 320: Line 324:
  
 ''rmdir'' will not delete a folder with contents. Use ''rm -rf foldername/'' to have **rm** to recursively delete the folder and its contents instead. ''rmdir'' will not delete a folder with contents. Use ''rm -rf foldername/'' to have **rm** to recursively delete the folder and its contents instead.
 +
 +----
 +
 +  * Next Page: [[tools:bash:shortcuts piping|Shortcuts & Piping Commands โ†’]]
 +  * [[tools:bash|Back to Index]]
tools/bash/getting-started.1716177721.txt.gz ยท Last modified: (external edit)

Find this page online at: https://bestpoint.institute/tools/bash/getting-started