mirror of
https://github.com/you-dont-need/You-Dont-Need-GUI.git
synced 2025-08-30 00:10:16 +02:00
Initial changes!
This commit is contained in:
19
readme.md
19
readme.md
@@ -71,6 +71,10 @@ cp readme.txt documents/
|
|||||||
```shell
|
```shell
|
||||||
cp readme.txt readme.bak.txt
|
cp readme.txt readme.bak.txt
|
||||||
```
|
```
|
||||||
|
More advanced:
|
||||||
|
```shell
|
||||||
|
cp readme{.bak}.txt
|
||||||
|
```
|
||||||
|
|
||||||
## copy a folder
|
## copy a folder
|
||||||
|
|
||||||
@@ -135,7 +139,7 @@ mv myMedia/ myMusic/
|
|||||||
**STOP DRAG AND DROPING TO MERGE FOLDERS** :-1:
|
**STOP DRAG AND DROPING TO MERGE FOLDERS** :-1:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
rsync -a /images/ /images2/
|
rsync -a /images/ /images2/ # note: may over-write files with the same name, so be careful!
|
||||||
```
|
```
|
||||||
|
|
||||||
## create a new file
|
## create a new file
|
||||||
@@ -145,7 +149,7 @@ rsync -a /images/ /images2/
|
|||||||
```shell
|
```shell
|
||||||
touch 'new file' # updates the file's access and modification timestamp if it already exists
|
touch 'new file' # updates the file's access and modification timestamp if it already exists
|
||||||
# or
|
# or
|
||||||
> 'new file' # erase the content if it already exists
|
> 'new file' # note: erases the content if it already exists
|
||||||
```
|
```
|
||||||
|
|
||||||
## create a new folder
|
## create a new folder
|
||||||
@@ -155,7 +159,7 @@ touch 'new file' # updates the file's access and modification timestamp if it al
|
|||||||
```shell
|
```shell
|
||||||
mkdir 'untitled folder'
|
mkdir 'untitled folder'
|
||||||
# or
|
# or
|
||||||
mkdir -p 'path/may/not/exist/untitled folder'
|
mkdir -p 'path/may/not/exist/untitled\ folder'
|
||||||
```
|
```
|
||||||
|
|
||||||
## show file/folder size
|
## show file/folder size
|
||||||
@@ -171,7 +175,8 @@ du -sh node_modules/
|
|||||||
**STOP RIGHT CLICKING AND SHOW FILE/FOLDER INFO** :-1:
|
**STOP RIGHT CLICKING AND SHOW FILE/FOLDER INFO** :-1:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
stat -x readme.md
|
stat -x readme.md # on macOS
|
||||||
|
stat readme.md # on Linux
|
||||||
```
|
```
|
||||||
|
|
||||||
## open a file with the default program
|
## open a file with the default program
|
||||||
@@ -232,7 +237,8 @@ rm -r my_useless_folder
|
|||||||
**STOP OPENING YOUR FINDER OR FILE EXPLORER** :-1:
|
**STOP OPENING YOUR FINDER OR FILE EXPLORER** :-1:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
ls -la my_folder
|
ls my_folder # Simple
|
||||||
|
ls -la my_folder # -l: show in list format. -a: show all files, including hidden. -la combines those options.
|
||||||
```
|
```
|
||||||
|
|
||||||
## tree view a folder and its subfolders
|
## tree view a folder and its subfolders
|
||||||
@@ -242,6 +248,7 @@ ls -la my_folder
|
|||||||
```shell
|
```shell
|
||||||
tree # on Linux
|
tree # on Linux
|
||||||
find . -print | sed -e 's;[^/]*/;|____;g;s;____|; |;g' # on MacOS
|
find . -print | sed -e 's;[^/]*/;|____;g;s;____|; |;g' # on MacOS
|
||||||
|
# Note: install homebrew (brew.sh) to be able to use (some) Linux utilities such as tree.
|
||||||
```
|
```
|
||||||
|
|
||||||
## find a stale file
|
## find a stale file
|
||||||
@@ -316,6 +323,8 @@ ping umair.surge.sh
|
|||||||
|
|
||||||
```shell
|
```shell
|
||||||
cat apps/settings.py
|
cat apps/settings.py
|
||||||
|
# or, if the file is too big, you can take its output and push it through a 'pager' which shows you one page at a time.
|
||||||
|
cat apps/settings.py | less
|
||||||
```
|
```
|
||||||
|
|
||||||
## search for a text
|
## search for a text
|
||||||
|
Reference in New Issue
Block a user