diff --git a/help/commands.md b/help/commands.md index 8859e15..e40dbc4 100644 --- a/help/commands.md +++ b/help/commands.md @@ -2,8 +2,60 @@ - Move files: `mv ` - Move directories: `mv -r ` +- Copy files: `cp ` +- Copy directories: `cp -r ` +- Copy all files from one directory to an existing directory (includes dotfiles and subdirectories): `cp -R dir_1/. dir_2/` -## Inox +Note that "renaming" files is the same as moving them from one location to another. For example, if you want to rename a file `oldfile` to `newfile`, then you would type `mv oldfile newfile`. + +- Print the contents of a file: `cat ` +- Batch rename multiple files: `rename -v ` +- Remove (delete) files: `rm ` +- Remove (delete) a directory: `rm -r ` +- Make a new file: `touch ` +- Make a new directory: `mkdir ` +- List all the files in a directory: `ls` +- List all the directories in a directory: `ls -d */` +- List all the files in a directory, including dotfiles: `ls -A` +- List all the files in dirname: `ls ` +- Only list png and jpg files: `ls *.{png,jpg}` + +## Switching Directories + +- Go up one directory `..` +- Go up two directories `...` +- Go to the home directory `~` OR simply `cd` with no parameters +- Go to dirname `dirname` + +Note that for all of the above, `cd` is not required. + +### Other Commands + +- Print the working directory: `pwd` +- Make a script executable: `chmod +x ` +- Termite the processes with a specific word in it: `killall -q ` + +### System Commands + +- Logout of the current user session: `logout` +- Restart the system: `reboot` +- Turn off the computer: `poweroff` + +## Installed Commands + +These programs are installed on top of the base system. + +- List the entire contents of a directory: `tree` +- List all the directories in a directory, up to 2 levels deep: `tree -d -L 2` +- Beautify any JSON output: ` | jq '.'` + +### Inox + +- Open a webpage in a borderless window: `inox --app=` +- Open a webpage in the regular browser window: `inox ` + +### Dealing with Archives + +- Zip all files in a directotry: `zip -r ` +- Extract any type of archiving algorithm: `extract ` -- Open in a new borderless window `inox --app=` -- Open in the current browser session `inox `