New symfony project: tips and commands

Create a new bundle:

php app/console generate:bundle

And if you want to go faster (i.e. no interactions), dir give the src path, namespace the name of the bundle and structure the need to generate basic directory :

php app/console generate:bundle --dir=/Volumes/Docs/Projects/CV/www/src --namespace=CV/EditorialBundle --structure --no-interaction

Useful disk commands


Warning: WP_Syntax::substituteToken(): Argument #1 ($match) must be passed by reference, value given in /www/chergeek/wp-content/plugins/wp-syntax/wp-syntax.php on line 380

I rarely use disk commands that why I often forget them and spend minutes to find the right command that I already used.

Here are some of the most useful disk commands I use:

# List all existing disks
fdisk -l
 
# Show mounted partitions, modify them in /etc/fstab, to mount use "-all" argument
mount
 
# Build a RAID 1 from 2 disks /dev/sda3 & /dev/sdb3
mdadm -C /dev/md3 --level=raid1 --raid-devices=2 /dev/sda3 /dev/sdb3
 
# Details about RAID /dev/md3
mdadm --detail /dev/md3
 
# Update mdadm.conf, delete lines before
mdadm --examine --scan >> /etc/mdadm/mdadm.conf
 
# Format /dev/md3 in ext4
mke2fs -t ext4 /dev/md3