Browse Source

file command

master
Anthony Fadly 1 year ago
parent
commit
bd779fc0bf
1 changed files with 15 additions and 1 deletions
  1. 15
    1
      oct1.md

+ 15
- 1
oct1.md View File

@@ -9,12 +9,14 @@
- For ()
- For () in ()

## Files and Commands

```
$ bash ./f # run file "f" in a subshell
$ bash -c <command> # run <command> in a subshell
$ ./f # execute file "f"
$ which <command> # where is <command> in path on filesystem
$ locate <string> # fine all instances of <string> on filesystem
$ locate <string> # find all instances of <string> on filesystem
```

## Find Commands
@@ -26,3 +28,15 @@ $ find / -name lab3.txt # find file named "lab3.txt" in /
```

You can search with [regular expressions](https://en.wikipedia.org/wiki/Regular_expression)

## File Command

```
$ file <file> # get file type, examples:

$ file ch1.lisp
ch1.lisp: Lisp/Scheme program, ASCII text

$ file ch5.py
ch5.py: Python script, ASCII text executable
```

Loading…
Cancel
Save