41개의 명령어를 찾았습니다
예제:
$ ls
ls -l
ls -a
ls -la
예제:
$ cd /path/to/directory
cd ..
cd ~
cd -
예제:
$ pwd
pwd -P
예제:
$ cp file1 file2
cp -r dir1 dir2
cp -i file1 file2
예제:
$ mv file1 file2
mv dir1 dir2
mv -i file1 file2
예제:
$ rm file
rm -r directory
rm -f file
rm -i file
예제:
$ mkdir directory
mkdir -p parent/child
mkdir -m 755 directory
예제:
$ rmdir directory
rmdir -p parent/child
예제:
$ touch file
touch -t 202301010000 file
touch -a file
예제:
$ cat file
cat -n file
cat file1 file2 > file3
예제:
$ grep pattern file
grep -r pattern directory
grep -i pattern file
예제:
$ find . -name "*.txt"
find . -type f -mtime -7
find . -size +100M
예제:
$ chmod 755 file
chmod u+x file
chmod -R 755 directory
예제:
$ chown user file
chown user:group file
chown -R user:group directory
예제:
$ tar -cvf archive.tar files
tar -xvf archive.tar
tar -czvf archive.tar.gz files
예제:
$ gzip file
gzip -d file.gz
gzip -l file.gz
예제:
$ ps
ps aux
ps -ef
예제:
$ kill PID
kill -9 PID
killall process_name
예제:
$ top
top -u username
top -p PID
예제:
$ df
df -h
df -T
예제:
$ du directory
du -h directory
du -sh *
예제:
$ head file
head -n 10 file
head -c 100 file
예제:
$ tail file
tail -n 10 file
tail -f file
예제:
$ sort file
sort -r file
sort -n file
예제:
$ uniq file
uniq -c file
uniq -d file
예제:
$ wc file
wc -l file
wc -w file
예제:
$ diff file1 file2
diff -u file1 file2
diff -r dir1 dir2
예제:
$ ln -s target link
ln target link
ln -f target link
예제:
$ history
history 10
history | grep pattern
예제:
$ alias ll='ls -l'
alias la='ls -la'
alias
예제:
$ export VAR=value
export PATH=$PATH:/new/path
export
예제:
$ source script.sh
. script.sh
예제:
$ echo "Hello World"
echo $PATH
echo -n "No newline"
예제:
$ printf "%s\n" "Hello World"
printf "%d\n" 42
printf "%.2f\n" 3.14159
예제:
$ read variable
read -p "Enter name: " name
read -s password
예제:
$ test -f file
[ -d directory ]
[[ $var == value ]]
예제:
$ if [ condition ]; then
commands
fi
예제:
$ for i in {1..5}; do
echo $i
done
예제:
$ while [ condition ]; do
commands
done
예제:
$ case $var in
pattern1) commands ;;
pattern2) commands ;;
esac
예제:
$ function name() {
commands
}
name() {
commands
}