linux

Mass copy data

Tag(s):

  1. Use cp.
  2. Use rsync to recheck or when cp get interrupted.

Proper way to load ~/.bashrc

Tag(s):

On most systems, ~/.bashrc is only used when starting an interactive non-login shell. However, when you start up a new shell it is often an interactive login shell. Since this is a login shell, the .bashrc is ignored. To keep the environment consistent between non-login and login shells, you must source the .bashrc from your .profile or your .bash_profile.

http://superuser.com/a/147699

Change MAC address

# Bring the interface down.
ip link set wlan0 down
 
# Change the MAC address using macchanger.
macchanger -e wlan0
 
# Bring the interface back up.

Find out what kernel drivers (modules) are loaded

Tag(s):

lsmod lists all modules. There are drivers compiled into the kernel and are not loadable modules, so you won’t see them with this command.

Delete all partitions of USB key

Tag(s):

# Assuming your USB device is /dev/sdX

Reread partition table without rebooting

Tag(s):

Symptom

After you executed multiple fdisk commands, you get the following error message:

Symbolic link

# Create a symbolic link
ln -s TARGET     LINK_NAME
 
# Remove symbolic link: Treat symbol link as a file

Find device name of cdrom

Tag(s):

dmesg | grep -iE "CD-ROM|cdrom|DVD"

Display network card/adapter available

inxi -N
 
rfkill list all
service network-manager restart

Pages

Subscribe to RSS - linux