warpdotdev /
warp
Warp is an agentic development environment, born out of the terminal.
Loading repository data…
rip-charon / repository
Bash is the GNU Project's shell—the Bourne Again SHell. This is an sh-compatible shell that incorporates useful features from the Korn shell (ksh) and the C shell (csh). It is intended to conform to the IEEE POSIX P1003.2/ISO 9945.2 Shell and Tools standard. It offers functional improvements over sh for both programming and interactive use. In addition, most sh scripts can be run by Bash without modification.
Bash is the GNU Project's shell—the Bourne Again SHell. This is an sh-compatible shell that incorporates useful features from the Korn shell (ksh) and the C shell (csh). It is intended to conform to the IEEE POSIX P1003.2/ISO 9945.2 Shell and Tools standard. It offers functional improvements over sh for both programming and interactive use. In addition, most sh scripts can be run by Bash without modification.
exportDisplays all environment variables. If you want to get details of a specific variable, use echo $VARIABLE_NAME.
export
Example:
$ export
AWS_HOME=/Users/adnanadnan/.aws
LANG=en_US.UTF-8
LC_CTYPE=en_US.UTF-8
LESS=-R
$ echo $AWS_HOME
/Users/adnanadnan/.aws
whatiswhatis shows description for user commands, system calls, library functions, and others in manual pages
whatis something
Example:
$ whatis bash
bash (1) - GNU Bourne-Again SHell
whereiswhereis searches for executables, source files, and manual pages using a database built by system automatically.
whereis name
Example:
$ whereis php
/usr/bin/php
whichwhich searches for executables in the directories specified by the environment variable PATH. This command will print the full path of the executable(s).
which program_name
Example:
$ which php
/c/xampp/php/php
Clears content on window.
catIt can be used for the following purposes under UNIX or Linux.
cat filename
cat file1 file2
cat file1 file2 > newcombinedfile
cat < file1 > file2 #copy file1 to file2
chmodThe chmod command stands for "change mode" and allows you to change the read, write, and execute permissions on your files and folders. For more information on this command check this link.
chmod -options filename
chownThe chown command stands for "change owner", and allows you to change the owner of a given file or folder, which can be a user and a group. Basic usage is simple forward first comes the user (owner), and then the group, delimited by a colon.
chown -options user:group filename
cpCopies a file from one location to other.
cp filename1 filename2
Where filename1 is the source path to the file and filename2 is the destination path to the file.
diffCompares files, and lists their differences.
diff filename1 filename2
fileDetermine file type.
file filename
Example:
$ file index.html
index.html: HTML document, ASCII text
findFind files in directory
find directory options pattern
Example:
$ find . -name README.md
$ find /home/user1 -name '*.png'
gunzipUn-compresses files compressed by gzip.
gunzip filename
gzcatLets you look at gzipped file without actually having to gunzip it.
gzcat filename
gzipCompresses files.
gzip filename
headOutputs the first 10 lines of file
head filename
lpqCheck out the printer queue.
lpq
Example:
$ lpq
Rank Owner Job File(s) Total Size
active adnanad 59 demo 399360 bytes
1st adnanad 60 (stdin) 0 bytes
lprPrint the file.
lpr filename
lprmRemove something from the printer queue.
lprm jobnumber
lsLists your files. ls has many options: -l lists files in 'long format', which contains the exact size of the file, who owns the file, who has the right to look at it, and when it was last modified. -a lists all files, including hidden files. For more information on this command check this link.
ls option
Example:
moreShows the first part of a file (move with space and type q to quit).
more filename
mvMoves a file from one location to other.
mv filename1 filename2
Where filename1 is the source path to the file and filename2 is the destination path to the file.
Also it can be used for rename a file.
mv old_name new_name
rmRemoves a file. Using this command on a directory gives you an error.
rm: directory: is a directory
To remove a directory you have to pass -r which will remove the content of the directory recursively. Optionally you can use -f flag to force the deletion i.e. without any confirmations etc.
rm filename
tailOutputs the last 10 lines of file. Use -f to output appended data as the file grows.
tail filename
touchUpdates access and modification time stamps of your file. If it doesn't exists, it'll be created.
touch filename
Example:
$ touch trick.md
awkawk is the most useful command for handling text files. It operates on an entire file line by line. By default it uses whitespace to separate the fields. The most common syntax for awk command is
awk '/search_pattern/ { action_to_take_if_pattern_matches; }' file_to_parse
Lets take following file /etc/passwd. Here's the sample data that this file contains:
root:x:0:0:root:/root:/usr/bin/zsh
daemon:x:1:1:daemon:/usr/sbin:/usr/sbin/nologin
bin:x:2:2:bin:/bin:/usr/sbin/nologin
sys:x:3:3:sys:/dev:/usr/sbin/nologin
sync:x:4:65534:sync:/bin:/bin/sync
So now lets get only username from this file. Where -F specifies that on which base we are going to separate the fields. In our case it's :. { print $1 } means print out the first matching field.
awk -F':' '{ print $1 }' /etc/passwd
After running the above command you will get following output.
root
daemon
bin
sys
sync
For more detail on how to use awk, check following link.
cutRemove sections from each line of files
example.txt
red riding hood went to the park to play
show me columns 2 , 7 , and 9 with a space as a separator
cut -d " " -f2,7,9 example.txt
riding park play
echoDisplay a line of text
display "Hello World"
echo Hello World
Hello World
display "Hello World" with newlines between words
echo -ne "Hello\nWorld\n"
Hello
World
egrepPrint lines matching a pattern - Extended Expression (alias for: 'grep -E')
example.txt
Lorem ipsum
dolor sit amet,
consetetur
sadipscing elitr,
sed diam nonumy
eirmod tempor
invidunt ut labore
et dolore magna
aliquyam erat, sed
diam voluptua. At
vero eos et
accusam et justo
duo dolores et ea
rebum. Stet clita
kasd gubergren,
no sea takimata
sanctus est Lorem
ipsum dolor sit
amet.
display lines that have either "Lorem" or "dolor" in them.
egrep '(Lorem|dolor)' example.txt
or
grep -E '(Lorem|dolor)' example.txt
Lorem ipsum
dolor sit amet,
et dolore magna
duo dolores et ea
sanctus est Lorem
ipsum dolor sit
fgrepPrint lines matching a pattern - FIXED pattern matching (alias for: 'grep -F')
example.txt
Lorem ipsum
dolor sit amet,
consetetur
sadipscing elitr,
sed diam nonumy
eirmod tempor
foo (Lorem|dolor)
invidunt ut labore
et dolore magna
aliquyam erat, sed
diam voluptua. At
vero eos et
accusam et justo
duo dolores et ea
rebum. Stet clita
kasd gubergren,
no sea takimata
sanctus est Lorem
ipsum dolor sit
amet.
Find the exact string '(Lorem|dolor)' in example.txt
fgrep '(Lorem|dolor)' example.txt
or
grep -F '(Lorem|dolor)' example.txt
foo (Lorem|dolor)
fmtSimple optimal text formatter
example: example.txt (1 line)
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
output the lines of example.txt to 20 character width
cat example.txt | fmt -w 20
Lorem ipsum
dolor sit amet,
consetetur
sadipscing elitr,
sed diam nonumy
eirmod tempor
invidunt ut labore
et dolore magna
aliquyam erat, sed
diam voluptua. At
vero eos et
accusam et justo
duo dolores et ea
rebum. Stet clita
kasd gubergren,
no sea takimata
sanctus est Lorem
ipsum dolor sit
amet.
grepLooks for text inside files. You can use grep to search for lines of text that match one or many regular expressions, and outputs only the matching lines.
grep pattern filename
Example:
$ grep admin /etc/passwd
_kadmin_admin:*:218:-2:Kerberos Admin Service:/var/empty:/usr/bin/false
_kadmin_changepw:*:219:-2:Kerberos Change Password Service:/var/empty:/usr/bin/false
_krb_kadmin:*:231:-2:Open Directory Kerberos Admin Service:/var/empty:/usr/bin/false
You can also force grep to ignore word case by using -i option. -r can be used to search all files under the specified directory, for example:
$ grep -r admin /etc/
And -w to search for words only. For more detail on grep, check following link.
nlNumber lines of files
example.txt
Lorem ipsum
dolor sit amet,
consetetur
sadipscing elitr,
sed diam nonumy
eirmod tempor
invidunt ut labore
et dolore magna
aliquyam erat, sed
diam voluptua. At
vero eos et
accusam et justo
duo dolores et ea
rebum. Stet clita
kasd gubergre
Selected from shared topics, language and repository description—not editorial ratings.
warpdotdev /
Warp is an agentic development environment, born out of the terminal.
YunoHost /
YunoHost is an operating system aiming to simplify as much as possible the administration of a server. This repository corresponds to the core code, written mostly in Python and Bash.
dana-at-cp /
backdoor-apk is a shell script that simplifies the process of adding a backdoor to any Android APK file. Users of this shell script should have working knowledge of Linux, Bash, Metasploit, Apktool, the Android SDK, smali, etc. This shell script is provided as-is without warranty of any kind and is intended for educational purposes only.
MegaManSec /
SSH-Snake is a self-propagating, self-replicating, file-less script that automates the post-exploitation task of SSH private key and host discovery.
lefayjey /
linWinPwn is a bash script that streamlines the use of a number of Active Directory tools
joelibaceta /
It is a simple python package to play videos in the terminal using characters as pixels