Ibm Linux Intro
Ibm Linux Intro
whoami
id
uname -a
man top
List available man pages, including a brief description for each command:
man -k .
curl --help
This provides a brief overview of the curl command's usage and options.
date
ls -lrt
pwd
mkdir new_folder
about:blank 1/6
14/01/2025, 14:08 about:blank
Up one level:
cd ../
To home:
cd ~` or `cd
rmdir temp_directory -v
ps
ps -e
top
df
touch a_new_file.txt
Copy a file:
cp file.txt new_path/new_name.txt
mv this_file.txt that_path/that_file.txt
rm this_old_file.txt -v
chmod +x my_script.sh
Change/modify file permissions to 'execute' only for you, the current user:
about:blank 2/6
14/01/2025, 14:08 about:blank
chmod u+x my_file.txt
chmod go-r
cat my_shell_script.sh
more ReadMe.txt
sort text_file.txt
In reverse order:
sort -r text_file.txt
uniq list_with_duplicated_lines.txt
Lines:
wc -l table_of_data.csv
Words:
wc -w my_essay.txt
about:blank 3/6
14/01/2025, 14:08 about:blank
Characters:
wc -m some_document.txt
Option Description
Extract lines containing the word "hello", case insensitive and whole words only:
Extract lines containing the pattern "hello" from all files in the current directory ending in .txt:
Suppose you have three files containing the first and last names of your customers, plus their phone numbers.
Use paste to align file contents into a Tab-delimited table, one row for each customer:
Suppose you have a text file whos rows consist of first and last names of customers, delimited by a comma.
Extract the second to fifth characters (bytes) from each line of a file:
Extract the characters (bytes) from each line of a file, starting from the 10th byte to the end of the line:
unzip my_zipped_file.zip
unzip my_zipped_file.zip -d extract_to_this_direcory
Print hostname:
hostname
ping www.google.com
ifconfig
ip
curl <url>
wget <url>
Authors
Jeff Grossman
Sam Propupchuk
Other Contributors
Rav Ahuja
about:blank 5/6
14/01/2025, 14:08 about:blank
about:blank 6/6